[英]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.