1

I have a list of individual redirects that move users (and google) from abc.site.com/page/name to xyz.site.com/newpagename. I want to be able to keep those individual redirects, but also specifically redirect "abc.site.com" to "xyz.site.com".

Any solution that I've found to accomplish that redirect also redirects abc.site.com/pagename to xyz.site.com/pagename, thereby overriding the aforementioned individual redirects. Is there any way to only redirect the document root (abc.site.com), without redirecting any subpages?

4

1 に答える 1

0

mod_rewriteを使用する

RewriteCond %{HTTP_HOST} ^abc.site.com$ [NC]
RewriteRule ^$ http://xyz.site.com [R=301]
于 2012-06-27T18:55:00.040 に答える