I want to redirect only 3 urls to new domain using 301 redirect
example.com/about -> newdomain.com/about
example.com/test -> newdomain.com/test
any way to achieve this? I have tried wordpress plugins but they allow relative domain redirect like
newdomain.com/about -> newdomain.com/newabout
I think it can be done with .htaccess rule but I only found the rule to redirect entire site like this
# BEGIN WordPress
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.oldsite.com RewriteRule (.*)
http://www.newsite.com/$1 [R=301,L]
# END WordPress
I dont know how to modify this to meet my needs.
RewriteCond %{HTTP_HOST} ^(www.)?oldsite.com
RewriteRule ^/?(about|test)/?$ http://www.newsite.com/$1 [R=301,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.