I’m trying to redirect my entire blog to a new domain without redirecting the admin area.
The code I use is as follows:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^old-domain.com$ [NC]
RewriteCond %{REQUEST_URI} !^/wp-login
RewriteCond %{REQUEST_URI} !^/wp-admin
RewriteRule ^(.*)$ http://new-domain.com/$1 [R=301,L]
But still I’m getting redirected to the new domain when I go to old-domain.com/wp-admin
Can anybody help?
Thanks.
Try:
This worked for me…