Don't 500 when the Accept-Language translation is unavailable

This commit is contained in:
root 2022-11-21 16:59:21 +00:00
parent 0eef63e584
commit 2aa614b9c5
1 changed files with 6 additions and 4 deletions

View File

@ -40,10 +40,12 @@ location /LICENSE.txt {
}
location / {
# rewrite ^(/.*)\.html(\?.*)?$ $1$2 permanent;
# rewrite ^/(.*)/$ /$1 permanent;
# try_files $uri $uri/index.html $uri.html $uri/ /en$uri @extensionless-php;
rewrite .* /$lang$uri;
if ( -d /var/www/website/$lang) {
rewrite .* /$lang$uri;
}
if ( !-d /var/www/website/$lang) {
rewrite .* /en$uri;
}
}
location /en {