Skip to main content
Post Closed as "Needs more focus" by dan
Tweeted twitter.com/#!/StackWebmasters/status/427932072846848000

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.

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 too 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

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 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.

added 212 characters in body
Source Link
Joeri
  • 21
  • 3

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 too 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

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'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 too 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

Formatting
Source Link
Zistoloen
  • 10k
  • 6
  • 36
  • 59

.htaccess language detection, redirect and friendly urlsURLs

I'm having problems with my .htaccess.htaccess file.. Can any1 please help.

RewriteEngine On

RewriteCond %{HTTP:Accept-Language} (fr) [NC]

RewriteRule .* http://www.xxx.be/frans [R,L]

RewriteRule .* http://www.xxx.be/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/

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]

RewriteRule ^(.*).html$ /$1 [R=301,L]Can anyone please help?

.htaccess language detection, redirect and friendly urls

I'm having problems with my .htaccess file.. Can any1 please help.

RewriteEngine On

RewriteCond %{HTTP:Accept-Language} (fr) [NC]

RewriteRule .* http://www.xxx.be/frans [R,L]

RewriteRule .* http://www.xxx.be/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]

.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 [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?

Source Link
Joeri
  • 21
  • 3
Loading