Skip to content

Commit d99cc13

Browse files
Update default.conf
1 parent 0735e24 commit d99cc13

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

default.conf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ server {
55

66
#access_log /var/log/nginx/host.access.log main;
77

8+
location ~ ^/(.+)\.html$ {
9+
return 302 /$1;
10+
}
11+
812
location / {
913
root /usr/share/nginx/html;
1014
index index.html index.htm;
1115

12-
rewrite ^/(.+)\.html$ /$1 redirect;
13-
1416
try_files $uri $uri.html $uri/ =404;
1517
}
1618

0 commit comments

Comments
 (0)