That’s my ‘old’ Caddyfile (for Caddy v1):
http://fantasy.de:8080 {
root /home/fantasymaps/fantasywebsite/fantasy.de
gzip
log ./access.log {
ipmask 255.255.0.0 ffff:ffff:ffff:ff00::
}
errors ./error.log
rewrite {
if {path} not_match ^/de.*
if {path} not_match ^/en.*
if {>Accept-Language} match ^de.*
to /de{uri} {path}
}
rewrite {
if {path} not_match ^/de.*
if {path} not_match ^/en.*
if {>Accept-Language} not_match ^de.*
to /en{uri} {path}
}
}
Purpose: Depending on the (browser) language settings an english or a german version of the website is called.
Question: How to port this to Caddy v2?