2010-11-23 16 views

Répondre

0

Redirect www à/fr

RewriteCond %{HTTP_HOST} !^www\.abc\.com$ [NC] 
RewriteRule .? http://abc.com/fr%{REQUEST_URI} [R=301,L] 

Redirect à/fr si aucune/en est définie

RewriteCond %{REQUEST_URI} !^/en [NC] 
RewriteRule .? http://abc.com/fr%{REQUEST_URI} [R=301,L] 

REQUEST_URI: La ressource demandé dans la ligne de requête HTTP (par exemple "/index.html").

Voici plus d'informations sur RewriteCond.