2017-11-27 03:14:32 +05:30
|
|
|
:80 {
|
|
|
|
root /srv/www
|
|
|
|
|
2017-11-30 18:15:48 +05:30
|
|
|
locale en-US zh-CN zh-TW pt-BR nl-NL fr-FR {
|
2017-11-27 03:14:32 +05:30
|
|
|
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}
|
|
|
|
}
|
|
|
|
|
2017-11-30 18:15:48 +05:30
|
|
|
rewrite /fr-FR/ {
|
|
|
|
regexp (.*)
|
|
|
|
to /fr-fr/{1}
|
|
|
|
}
|
|
|
|
|
2017-11-27 03:14:32 +05:30
|
|
|
header / Vary "Accept-Language"
|
|
|
|
}
|