![](/img/trans.png)
[英]Redirect from domainA.example.com and domainB.example.com to domainC.example.com/test
[英]how to redirect all requests from www.domainA.ext/subdir/ to www.domainB.com/ with htaccess?
我有一个新域(domainB.com),我希望将来自www.domainA.com/subdir/的所有请求重定向到该域。 我尝试过这行htaccess代码
redirect / http://www.domainB.com/
但是它不起作用,因为htaccess将所有domainA.com/subdir/重定向到domainB.com/ subdir如何删除“ subdir”? 谢谢
将此规则放在domainA.com/subdir/.htaccess
:
RewriteEngine On
RewriteRule ^(.*)$ http://www.domainB.com/$1 [L,NE,R=302]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.