J'essaye de rediriger tous les sous domaines vers le sous-domaines www.
J'ai donc mis dans mon htacces:
Mais il ne semble pas prendre en compte la redirection?
ou plus exactement il redirige
http://mondomaine.com > http://www.mondomaine.com
mais pas
http://w.mondomaine.com > http://www.mondomaine.com
en revanche
redirige
http://w.mondomaine.com > http://www.mondomaine.com
mais pas
http://mondomaine.com > http://www.mondomaine.com
Comment puis je rediriger
http://mondomaine.com & http://w.mondomaine.com > http://www.mondomaine.com
J'ai donc mis dans mon htacces:
Code:
RewriteBase /
RewriteCond %{HTTP_HOST} ^mondomaine.com$
RewriteRule ^(.*) http://www.mondomaine.com/$1 [QSA,L,R=301]
Mais il ne semble pas prendre en compte la redirection?
ou plus exactement il redirige
http://mondomaine.com > http://www.mondomaine.com
mais pas
http://w.mondomaine.com > http://www.mondomaine.com
en revanche
Code:
RewriteCond %{HTTP_HOST} ^([a-z]+)\.mondomaine.com [NC]
RewriteCond %{HTTP_HOST} !^www\.mondomaine.com [NC]
RewriteRule ^(.*) http://www.mondomaine.com/$1 [QSA,L,R=301]
http://w.mondomaine.com > http://www.mondomaine.com
mais pas
http://mondomaine.com > http://www.mondomaine.com
Comment puis je rediriger
http://mondomaine.com & http://w.mondomaine.com > http://www.mondomaine.com