Skip to content

Commit 3fadfef

Browse files
Merge pull request #180 from zaaakher/fix/nginx-slash
fix: trailing slashes redirecting to landing
2 parents 1641693 + 90571e2 commit 3fadfef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

nginx/nginx.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ http {
3636
location / {
3737
root /usr/share/nginx/html/docs;
3838
index index.html;
39+
# Add rewrite rule to handle URLs without trailing slash
40+
rewrite ^([^.]*[^/])$ $1/ permanent;
3941
try_files $uri $uri/ $uri.html =404;
4042
}
4143
# non existent pages are redirected to 404.html

0 commit comments

Comments
 (0)