.htaccess domain redirect

后端 未结 2 1298
说谎
说谎 2021-01-23 16:25

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

Ho

相关标签:
2条回答
  • 2021-01-23 16:47

    In your domain3's .htaccess, put:

    RedirectPermanent / http://www.domain2.com/test.html
    
    0 讨论(0)
  • 2021-01-23 17:03

    In your .htaccess, put:

    RewriteEngine On
    RewriteCond %{http_host} ^www\.domain3\.com [NC]
    RewriteRule ^(.*)$ http://www.domain3.com/test.html [R=301,NC]
    

    That should do it.

    0 讨论(0)
提交回复
热议问题