1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.domain\.com$
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} !^(www\.)?domain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^(game|software|other)\.domain\.com$
RewriteRule ^$ http://domain.com/ [NC,L,R]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule \.(?:css|png|jpe?g|gif|php)$ - [L]
RewriteRule mdl/(css|images|handles)/(.*)/(.*) /modules/$2/$1/$3 [NC,L]
RewriteRule tpl/(css|images|fonts)/(.*) /templates/default/$1/$2 [NC,L]
RewriteRule (fr|en)/(.*) /$2?language=$1 [NC,L]
RewriteCond %{QUERY_STRING} !(?:^|&)language=[^&]+
RewriteCond %{REQUEST_URI} !^/(?:fr|en)/
RewriteCond %{HTTP:Accept-Language} ^fr [NC]
RewriteRule .* /fr/$1 [L,R=permanent]
RewriteCond %{QUERY_STRING} !(?:^|&)language=[^&]+
RewriteCond %{REQUEST_URI} !^/(?:fr|en)/
RewriteRule .* /en/$1 [L,R=permanent]
</IfModule>
SetEnvIf Host "^([^\.]*)\.domain\.com$" CATEGORY=$1 |
Partager