I am looking for a .htaccess rule which will redirect any link of one domain to another with exact strcuture and if subfolder then a forword slash added to the new redirected URL.
For example -
website1.com
to
website2.com
website1.com/support
to
website2.com/support/
website1.com/user
to
website2.com/user/
I will really appreciate any guide or sample .htaccess code for my situation.
Thank you, Ron
Try the following.
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*)$ http://website2.com/$1 [R=301]
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.