.htaccess whit multi domains problem
Posted
by NeoNmaN
on Stack Overflow
See other posts from Stack Overflow
or by NeoNmaN
Published on 2009-12-14T08:23:36Z
Indexed on
2010/04/13
19:03 UTC
Read the original article
Hit count: 333
i have this .htaccess rule
RewriteCond %{HTTP_HOST} ^domain1.com
RewriteRule (.*) http://www.domain2.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} www.domain1.com
RewriteRule (.*) http://www.domain2.com/$1 [R=301,L]
and right now i hav this code
RewriteCond %{HTTP_HOST} ^www\.(.*)
RewriteRule (.*) http://%1/$1 [R=301,L]
the problem is right now if i type www.domain1.com its return to domain1.com and not www.domain2.com
i will have it to if i type www.domain1.com, domain1.com or domain3.com its will return to this domain ( www.domain2.com ) and if i type ( domain2.com ) its return to www.domain2.com
i hob i can be help here tanks a lot.
© Stack Overflow or respective owner