fix redirect 301 bug

This commit is contained in:
Montech
2026-09-27 09:17:53 +03:30
parent 4f611d6fca
commit 1af5b555b8
2 changed files with 5 additions and 6 deletions
+2 -5
View File
@@ -4,17 +4,14 @@ server {
root /usr/share/nginx/html;
index index.html;
location = /index.html {
return 301 /;
}
location /_next/static/ {
expires 1y;
add_header Cache-Control "public, immutable";
}
# $uri/index.html به‌جای $uri/ تا دایرکتوری / ریدایرکت ۳۰۱ نسازد
location / {
try_files $uri $uri.html $uri/ /404.html;
try_files $uri $uri.html $uri/index.html =404;
}
error_page 404 /404.html;