: How to redirect all links to new site with same domain & same content? Is the same domain but i change url structure and website platform and is important to save all traffic from old links.
Is the same domain but i change url structure and website platform and is important to save all traffic from old links.
More posts by @Shakeerah822
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.