I use a lot of redirecting, a result of site evolution over time – moving from one CMS to another, having multiple languages on my site etc. Most of the time I simply used:
1 |
RedirectPermanent /folder/products http://www.domain.com/new_folder/products |
I use clean url (there are no extensions at the end) and sometimes the structure hierarchy gets complicated and some links under the parent’s structure don’t need a redirect while their parent do need it. For those cases an exact redirect is needed so only the parent will be redirected without affecting its kids. I use redirectMatch 301 for that:
1 |
redirectMatch 301 ^/folder/products$ http://www.domain.com/new_folder/products |
Note the “^” at the beginning and “$” at the end of the exact match.