Automatic language redirect with htaccess

#1
Hello.
Please, help. How to implement a similar construction in openlitespeed?

Code:
RewriteCond %{HTTP_HOST} .*la-combe.com [NC]
RewriteCond %{HTTP:Accept-Language} ^nl [NC]
RewriteRule ^$ http://%{HTTP_HOST}/ [L,R=301]

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

# Fallback for any other language to english
RewriteCond %{HTTP_HOST} .*la-combe.com [NC]
RewriteRule ^$ http://%{HTTP_HOST}/en/ [L,R=301]
 

Pong

Administrator
#4
Enable rewrite log to check where is wrong in your rule. Also make sure to restart OLS after any changes in .htaccess.
 
Top