Reputation: 2425
move from subdomain
to
i would like that http://randy.savage.com/path/path/path will be transported to the new domain also.
Except
http://randy.savage.com/you/are/pretty
http://randy.savage.com/maybe/dance
etc.
those should stay like they are
how can this be done?
Upvotes: 1
Views: 61
Reputation: 786329
put this code in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^randy\.savage\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/(you/are/pretty|maybe/dance) [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g|gif|bmp|png|tiff|css|js)$ [NC]
RewriteRule ^ http://www.randy.com%{REQUEST_URI} [L,NE,R=301]
Upvotes: 1