fix: trailing slashes redirecting to landing

This commit is contained in:
Zakher Masri
2025-02-12 04:26:43 +03:00
parent c7857c7728
commit 90571e244e
+2
View File
@@ -36,6 +36,8 @@ http {
location / {
root /usr/share/nginx/html/docs;
index index.html;
# Add rewrite rule to handle URLs without trailing slash
rewrite ^([^.]*[^/])$ $1/ permanent;
try_files $uri $uri/ $uri.html =404;
}
# non existent pages are redirected to 404.html