My site currently has 2 domains registered. I would like to forward
all traffic from one domain to the other. For example, my site is
registered as both
www.xxx.com and
www.yyy.com, and I would like all
users who visit
www.xxx.com to be automatically redirected to
www.yyy.com. I placed a .htaccess file in the document root containing
only the following:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.xxx.com$ [NC]
RewriteRule ^(.*)$ http://www.yyy.com/$1 [R=301,L]
however, I get a "Forbidden" error upon visiting either xxx.com or
yyy.com after restarting apache. Any suggestions?