diff --git a/nginx.conf b/nginx.conf index 7399458..95fbe5c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,14 +1,13 @@ server { - listen 80; + listen 80; index index.html; root /usr/share/nginx/html; location / { - try_files $uri $uri/ /index.html; - } - - location ~ \.html$ { - try_files $uri =404; + if ($request_uri ~ ^/(.*)\.html) { + return 302 /$1; + } + try_files $uri $uri.html $uri/ =404; } }