Forum Moderators: phranque
I am trying to get a RewriteRule to work, but it doesn't seem to want to no matter what I do.
I want an old site located at www.domain.com/sites/sitename.com/... to mod-rewrite it's contents to
sitename.domain.com/...
(NOTE: There are nine sites that I am moving like this - so a dynamic solution is prefered.)
This is the rule I put in my htaccess:
RewriteRule sites\/(.*)\.com\/(.*)$ [$1.themms.com...] [r]
Unfortunatly it just displays the old site, and doesn't redirect. It is important that the site be able to preserve its PR.
Thanks for your help!
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^sites/([^.]*)\.com(.*)$ http://$1.thenewdomain.com$2 [R=301,L]
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^/sites/([^.]*)\.com(.*)$ http://$1.thenewdomain.com$2 [R=301,L]
Jim