Afficher un message
Vieux 28/09/2006, 14h32   #1
scott.tieds@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Using .htaccess to redirect from one domain to another

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?

  Réponse avec citation
 
Page generated in 0,05044 seconds with 9 queries