Fixed nginx mod_rewrite templates

This commit is contained in:
alexey
2026-03-21 23:17:24 +03:00
parent f398decba9
commit e37e8a0d1e
3 changed files with 12 additions and 14 deletions

View File

@@ -25,20 +25,19 @@ server {
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
HtaccessEnable on;
RewriteEngine On;
location ~ /\.(?!well-known\/) {
deny all;
return 404;
}
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js|txt)$ {
expires max;
fastcgi_hide_header "Set-Cookie";
}
location / {
RewriteEngine On;
location ~* ^.+\.(jpeg|jpg|png|webp|gif|bmp|ico|svg|css|js)$ {
expires max;
fastcgi_hide_header "Set-Cookie";
}
location ~ [^/]\.php(/|$) {
try_files $uri =404;