I'm having problems with my .htaccess file.
RewriteEngine On
RewriteCond %{HTTP:Accept-Language} (fr) [NC]
RewriteRule .* http://www.example.com/frans [R,L]
RewriteRule .* http://www.example.com/nederlands [R,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+)$ $1.html [L,QSA]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.html\ HTTP/
RewriteRule ^(.*)\.html$ /$1 [R=301,L]
Can anyone please help?
I want it tooto detect the browser language of the client, then redirect French to /frans/frans
, and all other languages to /nederlands/nederlands
.
Also iI want to show the urlsURLs without .html.html
or .php.php
at the end, so clean urlsURLs.