htaccess的域名重定向 [英] .htaccess domain redirect
本文介绍了htaccess的域名重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经有3个域名服务器都指向它。所有域都在同一个网站上。
I have a server which has 3 domains all pointing to it. All domains are on the same website.
www.domain1.com
www.domain2.com
www.domain3.com
我如何可以重定向www.domain3.com使用的.htaccess www.domain3.com/test.html~~V?
How can I redirect www.domain3.com to www.domain3.com/test.html using .htaccess?
谢谢!
推荐答案
在你的.htaccess,把:
In your .htaccess, put:
RewriteEngine On
RewriteCond %{http_host} ^www\.domain3\.com [NC]
RewriteRule ^(.*)$ http://www.domain3.com/test.html [R=301,NC]
这应该这样做。
这篇关于htaccess的域名重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文