Jump to content

.htaccess forward multiple domains?


MECU

Recommended Posts

I have a .htaccess file that works if I do this:

RewriteEngine onrewritecond %{http_host} ^1.com [nc]rewriterule ^(.*)$ [url="http://www.1.com/$1"]http://www.1.com/$1[/url] [r=301,nc]

But if I try and expand it to have a second website that's pointed to this website nothing works, not even the redirect from above, like this:

RewriteEngine onrewritecond %{http_host} ^1.com [nc]rewritecond %{http_host} ^2.com [nc]rewritecond %{http_host} ^www.2.com [nc]rewriterule ^(.*)$ [url="http://www.1.com/$1"]http://www.1.com/$1[/url] [r=301,nc]

What am I doing wrong here?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...