Hi,
I’m currently struggling with rewrite based on the Client-Browser’s Accept-Language.
My public_html folder looks like this:
/images/image.png
/index-de.html
/index.en.html
→ there is no index.html file! (so simply accessing domain.tld brings up a 404 without any rewrite rule)
Currently, i’m using the following code (and also played around a bit with the {path} directives but without any result, still getting a 404):
rewrite / {
if {>Accept-Language} has de
to {path} {path}/ /index-de.html
}
rewrite / {
if {>Accept-Language} not_has de
to {path} {path}/ /index-en.html
}
Would be glad if you could help me to get this properly working
Best Regards
Michael