How to apply 301 redirect just to network's main blog?
-
I’m about to move my current website (e.g. old.com) to a new domain (e.g. new.com), so I need to have a 301 permanent redirect from one side to the other without messing the remaining network blogs, and maybe excluding a few exceptions, such as
/wp-admin
and friends.Using
Redirect 301 / https://new.com/
will redirect all pages, including all blogs in the network and their/wp-*
stuff. My guess is to use a.htaccess
rewrite rule like the following:RewriteEngine on RewriteBase / RewriteRule (.*) https://www.new.com/$1 [R=301,L]
But wouldn’t this redirect everything as well? Here’s how my current
.htaccess
looks like, in case it helps. Also, all posts have the same permalinks across both old.com and new.com (e.g.old.com/banksy
->new.com/banksy
).How can I apply a 301 redirect just to my network main blog and still be able to access
old.com/wp-admin
and all remaining network blogs?
- The topic ‘How to apply 301 redirect just to network's main blog?’ is closed to new replies.