Is the same domain but i change url structure and website platform and is important to save all traffic from old links.

  • 1
    Why didn't you include all the information from your comments on Stack Overflow? I'll ask again here: what did you change? Commented May 29, 2014 at 10:17
  • Which platform (webserver and CMS) is your system running on?
    – Jost
    Commented May 29, 2014 at 11:05

1 Answer 1


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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.