Hi folks.
Sorry to trouble you all with something that seems even to me to be rather simple, but I've spent two days and still can't get it to work properly.
I have three slightly-different domain names that all point to the same web directory via virtual hosts.
What I want to do is have two of the three "turn into" the first one, and I think I can do that using mod_rewrite, if I'm not mistaken.
I've read the Apache docs, searched the web, searched through these forums, and still cannot get this to work.
Here's what I want to do:
I want xxxxx.org and
www.xxxxx.org to always turn into
www.yyyyy.org.
So here's what I added to httpd.conf:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^xxxxx\.org [NC]
RewriteRule ^/.* http://www.yyyyy.org%{REQUEST_URI} [R,L]
I've tried it with and without the ! on the second line, because I've seen it both ways. I've tried ^(.*)$ instead of ^/.* on the third line, because I've seen it both ways. I've also had /$1 instead of %{REQUEST_URI} because I've seen that differently as well.
I've tried commenting out the virtual host entry for xxxxx.org, but that didn't help.
Surely I'm making a simple mistake....
I'd appreciate any and all suggestions.
Thanks in advance.
Mike