apache - Redirecting a domain with htaccess with a few specific 301s -
is possible redirect old traffic new site 301.
rewriteengine on rewritebase / rewritecond %{http_host} !new-example.com$ [nc] rewriterule ^(.*)$ http://new-example.com/$1 [l,r=301] however, need manually map pages new equivalent pages
redirect 301 /about http://new-example.com/about-us is possible both?
if going use rewrite, use only. don't recommend use both mod-alias , mod-rewrite. can use rewrite map individual pages too. order matters. catchall rule should last one. provide cleaner code imo.
rewriteengine on rewritebase / rewritecond %{http_host} !^new-example.com$ [nc] rewriterule ^about/?$ http://new-example.com/about-us [r=301,l] rewritecond %{http_host} !new-example.com$ [nc] rewriterule ^(.*)$ http://new-example.com/$1 [l,r=301]
Comments
Post a Comment