: .htaccess language detection, redirect and friendly URLs I'm having problems with my .htaccess file. RewriteEngine On RewriteCond %{HTTP:Accept-Language} (fr) [NC] RewriteRule .* http://www.example.com/frans
I'm having problems with my .htaccess file.
RewriteEngine On
RewriteCond %{HTTP:Accept-Language} (fr) [NC]
RewriteRule .* www.example.com/frans [R,L]
RewriteRule .* www.example.com/nederlands [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ .html [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /.*.html HTTP/
RewriteRule ^(.*).html$ / [R=301,L]
Can anyone please help?
I want it to detect the browser language of the client, then redirect French to /frans, and all other languages to /nederlands.
Also I want to show the URLs without .html or .php at the end, so clean URLs.
More posts by @Shelley277
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.