server {
listen 80;
index index.html;
root /usr/share/nginx/html;
location / {
if ($request_uri ~ ^/(.*)\.html) {
return 302 /$1;
}
try_files $uri $uri.html $uri/ =404;