![](/img/trans.png)
[英]How to redirect a domain alias to a subfolder of the primary domain using .htaccess
[英]How to redirect full domain URL and remove subfolder using htaccess
如何将我的Apaches .htaccess
文件中的以下内容从http://example1.com/folder/index.php
重定向到http://example2.com/index.php
?
您可以使用:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?siteone\.com$ [NC]
RewriteRule ^folder(/.*)?$ http://www.sitetwo.com$1 [L,R=301]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.