views:

35

answers:

2

Hello Guys,

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

How can I redirect www.domain3.com to www.domain3.com/test.html using .htaccess?

Thanks!

+1  A: 

In your domain3's .htaccess, put:

RedirectPermanent / http://www.domain2.com/test.html
Marc B
thanks for this. but I got the my question wrong. Please see edited version. thanks!
steamboy
+2  A: 

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.

cvaldemar