I have been searching around and I couldn't find the following. I was wondering if it is possible to redirect my whole WordPress blog to a new domain except for the root or homepage itself. Any push in the right direction would be great. I hope I'm not asking a silly question here!
Thanks in advance for anyone who has the time to look at my question.
Yes you can, try this code :
RewriteEngine on
RewriteRule ^(index.php)?$ - [L]
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.+)$ http://www.newdomain.com/$1 [R=301,QSA,L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.