What is domain.com now? Nothing? Then you should be able to park (or mirror) the old domain onto the new one.
Which isn’t a WP question but a ‘how to point an old domain to a new one’
Thread Starter
rublue
(@rublue)
I’m sorry, it’s wordpress multisite.
i have old domain with wordpress multi site, i want to move it to new domain.
i’m using this code to redirect
RewriteCond %{HTTP_HOST} ^old\.com$ [OR]
RewriteRule ^(.*)$ “http\:\/\/new\.net\/$1” [R=301,L]
but that doesn’t work for its subdomain.
i have old domain with wordpress multi site, i want to move it to new domain.
Okay so there are two parts.
1) Moving the site (which you did and THAT is the ‘multisite’ part)
2) Redirecting the old domain to the new one.
#2 isn’t anything to do with WordPress at all, it’s just normal WebStuff.
RewriteCond %{HTTP_HOST} ^old\.com$ [OR]
RewriteRule ^(.*)$ "http\:\/\/new\.net\/$1" [R=301,L]
That’s not working because you said ‘If this is old.com…’ not ‘If this is <anything>.old.com’
Surprisingly you’ll want this:
RewriteCond %{HTTP_HOST} !^www.old.com$ [NC]
RewriteRule ^(.*)$ http://new.com/$1 [R=301,QSA,L]
Thread Starter
rublue
(@rublue)
RewriteCond %{HTTP_HOST} !^www.old.com$ [NC]
RewriteRule ^(.*)$ http://new.com/$1 [R=301,QSA,L]
that’s doesn’t too for redirect <anything>.old.com to <anything>.new.com
Thanks for respon Ipstenu 🙂
Does it redirect anything at all?
FWIW, that works on my server, but they can all be different.
Can you park the old.com domain on top of the new.com one in your control panel instead? Otherwise the best way would be in your virtual hosts:
<VirtualHost *:80>
ServerName old.com
Redirect permanent / http://new.com/
</VirtualHost>