I have a new domain (domainB.com) to which I wish to redirect all requests from www.domainA.com/subdir/. I tried whith this line of htaccess code
redirect / http://www.domainB.com/
but it doesn't works because htaccess redirects all domainA.com/subdir/ to domainB.com/ subdir How can I remove the "subdir"? Thanks
Place this rule in domainA.com/subdir/.htaccess
:
RewriteEngine On
RewriteRule ^(.*)$ http://www.domainB.com/$1 [L,NE,R=302]
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.