Answer the question
In order to leave comments, you need to log in
Proper redirect to new domain with subdomains?
There is a site
old.com, with a bunch of subs like sub1.old.com, sub2.old.com, sub3.old.com...
Is it possible to somehow transfer the site to a new domain while respecting the subs using htaaccess?
I somehow started digging like this, but how to replace the steering wheel already in the rewrite ((((
RewriteCond %{HTTP_HOST} !([^\.]+)\.new.com$ [NC]
RewriteRule ^$ ????????????????
Answer the question
In order to leave comments, you need to log in
RewriteCond %{HTTP_HOST} (.+)\.old\.com$ [NC]
RewriteRule ^(.*)$ http://%1/new.com/$1 [QSA,L,R=301]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question