🚑 Fixes NGinx rewrite rules

This commit is contained in:
Franck Nijhof 2018-05-23 00:00:56 +02:00
parent e853ef30b3
commit 72b3ea643b
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3
2 changed files with 34 additions and 24 deletions

View file

@ -35,6 +35,10 @@ http {
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
location /data/ {
deny all;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_read_timeout 900;
@ -44,10 +48,10 @@ http {
include fastcgi_params;
}
location /data/ {
deny all;
location ~ ^(.*)\.(css|js|gif||jpe?g|png|json|cache\.json)$ {
}
location / {
rewrite ^/login$ /login.php last;
rewrite ^/logout$ /login.php?logout=logout last;
rewrite ^/doAjaxAll$ /index.php?doAjaxAll=doAjaxAll last;
@ -60,3 +64,4 @@ http {
rewrite ^/([a-zA-Z_]+)/?$ /index.php?page=$1;
}
}
}

View file

@ -19,6 +19,10 @@ http {
root /var/www/sonweb/;
index index.php;
location /data/ {
deny all;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_read_timeout 900;
@ -28,10 +32,10 @@ http {
include fastcgi_params;
}
location /data/ {
deny all;
location ~ ^(.*)\.(css|js|gif||jpe?g|png|json|cache\.json)$ {
}
location / {
rewrite ^/login$ /login.php last;
rewrite ^/logout$ /login.php?logout=logout last;
rewrite ^/doAjaxAll$ /index.php?doAjaxAll=doAjaxAll last;
@ -44,3 +48,4 @@ http {
rewrite ^/([a-zA-Z_]+)/?$ /index.php?page=$1;
}
}
}