Forum Moderators: phranque
redirect 301 / http://www.newsite.com/
redirect 301 /about/ http://www.newsite.com/about/
redirect 301 /services/ http://www.newsite.com/our-services/
redirect 301 /contact/ http://www.newsite.com/contact-us/ www.oldsite.com/services/ in the address bar, I get redirected to www.newsite.com/services/ and not www.newsite.com/our-services/
Redirect 301 /services/ http://www.newsite.com/our-services/
Redirect 301 /contact/ http://www.newsite.com/contact-us/
Redirect 301 / http://www.newsite.com/
RewriteEngine On
RewriteBase /
# Any specific cases where old path does not match new one
RewriteRule ^services/$ http://www.newsite.com/our-services/ [R=301,L]
RewriteRule ^contact/$ http://www.newsite.com/contact-us/ [R=301,L]
RewriteRule ^index.php$ http://www.newsite.com/ [R=301,L]
# General rewrite for everything else whose new path is same as old
RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301]
http://www.oldsite.com/services (without the trailing slash)? Nice websites or servers sometimes add the slash -- if so, the first rules could be written in this form:
RewriteRule ^services/?$ http://www.newsite.com/our-services [R=301,L]