diff --git a/config/nginx.conf b/config/nginx.conf index 5215c3d..cf04f16 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -112,7 +112,10 @@ http { index index.html; location / { - try_files $uri $uri/ /index.html; + if ($request_uri ~ ^/(.*)\.html(\?|$)) { + return 302 /$1; + } + try_files $uri $uri.html $uri/ =404; } location ~* .(jpg|jpeg|png|gif|ico|css|js)$ {expires 30d;}