Bonjour,
J'ai un souci avec mon fichier .htaccess pour faire mes redirections sachant que mon hébergeur est OVH (serveur apache si j'ai tout compris...)
Ce que je cherche à faire :
Rediriger toutes les adresses suivantes :
nom-domaine
nom-domaine.fr
nom-domaine.com
http://nom-domaine.fr
http://nom-domaine.com
nom-domaine.fr/index.html
nom-domaine.com/index.html
http://nom-domaine.fr/index.html
http://nom-domaine.com/index.html
http://www.nom-domaine.fr/index.html
http://www.nom-domaine.com/index.html
vers :
http://www.nom-domaine.fr
ce que j'ai tenté (quelques exemples) :
Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} ^nom-domaine\.fr$ [NC]
RewriteRule ^/(.*) http://www.nom-domaine.fr/$1 [QSA,L,R=301]
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} #domaine\.[fr|com]$# [NC,OR]
RewriteCond %{HTTP_HOST} #index\.html$# [NC,OR]
RewriteRule ^\(.*) http://www.nom-domaine.fr/$1 [QSA,L,R=301]
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} #nom-domaine\.[fr|com]$# [NC,OR]
RewriteCond %{HTTP_HOST} #nom-domaine\.[fr|com]/index\.html$# [NC,OR]
RewriteRule ^/(.*) http://www.nom-domaine.fr/$1 [QSA,L,R=301]
Options -Indexes
RewriteEngine on
RewriteCond %{HTTP_HOST} nom-domaine\.[fr|com]$ [NC,OR]
RewriteCond %{HTTP_HOST} nom-domaine\.[fr|com]/index\.html$ [NC,OR]
RewriteRule ^/(.*) http://www.nom-domaine.fr/$1 [QSA,L,R=301]
J'ai parcouru une bonne douzaine de tuto sur les regex (voir ci-dessus ce que j'en ai tiré) mais rien ne fonctionne... (quand ça ne fait pas une erreur 500...)
Quelqu'un aurait-il la solution ??
Merci
Configuration: Windows XP
Firefox 2.0.0.16

