Hi.
I currently have 3 domains pointing to the same site, using my httpd.ini I'm trying to rewrite two of them so that DOMAIN1.COM and DOMAIN2.COM forward to the same page on DOMAIN3.COM.
e.g. [DOMAIN1.COM/bla -> DOMAIN3.COM/bla] [DOMAIN2.COM/bla -> DOMAIN3.COM/bla]
This bit is working fine using :
# redirect to the same URL, but on DOMAIN 3
RewriteCond Host: (?!^www.domain3.com)(.+)
RewriteRule /(.*) http\://www.domain3.com/$2 [I,RP]
The other requirement is that users coming in on DOMAIN1.COM/ and DOMAIN2.COM/ (i.e. their home pages) are forwarded to specific pages.
e.g. [DOMAIN1.COM/ -> DOMAIN3.COM/domain1] [DOMAIN2.COM/ -> DOMAIN3.COM/domain2]
I have this working on the first domain, with the following rule
RewriteCond Host: (www.domain1.com)
RewriteRule / http\://www.domain3.com/domain1 [I,RP,NE]
but this doesn't work for the other domain, the only difference is that it has a hyphen (www.domain-2.com) character in the domain name - should that cause any problems? Any ideas how I can fix it?
TIA