URL tidy
This commit is contained in:
@@ -37,9 +37,14 @@ http {
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# Serve HTML files without .html extension (e.g., /admin -> admin.html)
|
||||
location ~ ^/([a-zA-Z0-9_-]+)$ {
|
||||
try_files /$1.html =404;
|
||||
}
|
||||
|
||||
# Serve static files
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
# Apply X-Frame-Options to other files
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user