diff --git a/common/website.conf b/common/website.conf index 6c3296b..1f0fda7 100644 --- a/common/website.conf +++ b/common/website.conf @@ -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 {