Mobile app version of vmapp.org
Login or Join
Lee4591628

: You're almost there. Drop the very first RewriteCond (as it's not required and won't match ever) and add a trailing / to your last RewriteRule since you're redirecting with them. RewriteEngine

@Lee4591628

You're almost there. Drop the very first RewriteCond (as it's not required and won't match ever) and add a trailing / to your last RewriteRule since you're redirecting with them.

RewriteEngine On

RewriteCond %{HTTP:Accept-Language} ^en [NC]
RewriteRule ^$ mysite.com/en/ [L,R=301]

RewriteCond %{HTTP:Accept-Language} ^de [NC]
RewriteRule ^$ mysite.com/de/ [L,R=301]

RewriteCond %{HTTP:Accept-Language} ^nl [NC]
RewriteRule ^$ mysite.com/nl/ [L,R=301]

RewriteCond %{HTTP:Accept-Language} ^fr [NC]
RewriteRule ^$ mysite.com/fr/ [L,R=301]

RewriteCond %{HTTP:Accept-Language} ^es [NC]
RewriteRule ^$ mysite.com/es/ [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(en|de|nl|fr|es)/?$ index.php?lang= [QSA,NC,L]

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Lee4591628

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme