Mobile app version of vmapp.org
Login or Join

Login to follow query

More posts by @Shakeerah822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Berryessa370

If you are using the Apache webserver with activated mod_alias, you can use RedirectPermanent-Rules in your .htaccess/vHost-config:

RedirectPermanent /old/url /foo/bar


This specific rule only works with Apache version greater or equal to 2.2.6. In older versions, the second URL should be an absolute URL.

The above affects all requests to URIs beginning with /old/url. It strips the /old/url prefix, and replaces it with /foo/bar. So /old/url/qux/index.html would be redirected to /foo/bar/qux/index.html.

You can add one RedirectPermanent directive for each URL that needs to be redirected, but if possible, try to leverage the prefix matching to save some rules. If the RedirectPermanent isn't mighty enough for your purposes, consider using RedirectMatch or mod_rewrite.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme