Hello
I am trying to implement conditional redirects on my webserver (Apache2 on debian sarge) in a .htaccess file. This is my first time working with .htaccess at all, so from this point of view I am a noob.
What I want: based on accept-language I'd like to redirect the user:
if accept-language==de
redirect_from:
www.somehost.com to
www.somehost.com/german.html
elsif accept-language==fr
redirect_from:
www.somehost.com to
www.somehost.com/french.html
else
dont't redirect.
I was trying to do so by using something like this:
RewriteEngine on
RewriteCond %{HTTP: accept-language} (de)
RewriteRule $1 $1/german.html [(option for appending -> can't remember anymore),L]
Of course, this gave me infinite redirects...
But I have no clue how I can do this. Any hints?
Thanks.