mirror of
https://github.com/go-gitea/gitea
synced 2024-11-14 01:35:54 +01:00
40 lines
488 B
Plaintext
40 lines
488 B
Plaintext
|
: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"
|
||
|
}
|