diff options
Diffstat (limited to 'docs/docker/caddy.conf')
-rw-r--r-- | docs/docker/caddy.conf | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/docker/caddy.conf b/docs/docker/caddy.conf new file mode 100644 index 0000000000..d1b66ce850 --- /dev/null +++ b/docs/docker/caddy.conf @@ -0,0 +1,39 @@ +:80 { + root /srv/www + + locale en-US zh-CN zh-TW pt-BR nl-NL { + detect header + } + + redir 301 { + if {path} match ^/$ + / /{>Detected-Locale}/ + } + + rewrite /en-US/ { + regexp (.*) + to /en-us/{1} + } + + rewrite /zh-CN/ { + regexp (.*) + to /zh-cn/{1} + } + + rewrite /zh-TW/ { + regexp (.*) + to /zh-tw/{1} + } + + rewrite /pt-BR/ { + regexp (.*) + to /pt-br/{1} + } + + rewrite /nl-NL/ { + regexp (.*) + to /nl-nl/{1} + } + + header / Vary "Accept-Language" +} |