Skip to content

Commit 1157594

Browse files
committed
Auto add / to the end of the URL
Signed-off-by: Tamal Saha <[email protected]>
1 parent 64c52a5 commit 1157594

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

default.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ server {
77
location / {
88
root /usr/share/nginx/html;
99
index index.html index.htm;
10+
11+
# https://stackoverflow.com/a/49314484/244009
12+
rewrite ^([^.\?]*[^/])$ https://$http_host$1/ permanent;
1013
}
1114

1215
#error_page 404 /404.html;

0 commit comments

Comments
 (0)