fix: handle deck paths without trailing slash via 301 redirect
Deploy Slides / build-and-deploy (push) Successful in 1m44s
Deploy Slides / build-and-deploy (push) Successful in 1m44s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+2
-4
@@ -9,15 +9,13 @@ server {
|
||||
try_files /index.html =404;
|
||||
}
|
||||
|
||||
# Deck paths: /resume/, /resume/1, /demo/assets/style.css, etc.
|
||||
# For /resume/1: $uri (no file) → $uri/ (no dir) → fallback to /resume/index.html
|
||||
# For /demo/assets/style.css: $uri (real file) → served directly
|
||||
# /resume/1, /demo/assets/style.css — paths with trailing slash
|
||||
location ~ ^/([^/]+)/ {
|
||||
try_files $uri $uri/ /$1/index.html =404;
|
||||
}
|
||||
|
||||
# /resume (no trailing slash) → 301 redirect to /resume/
|
||||
location / {
|
||||
location ~ ^/([^/]+)$ {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user