From 0e87e6cfce95d288d0e21d08c2e1900a056cba1b Mon Sep 17 00:00:00 2001 From: Robles Rodolphe Date: Wed, 8 Jul 2020 04:29:33 +0200 Subject: [PATCH] add redirect proctected urls --- conf/nginx.conf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4dc56d5..efd6ba0 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -8,11 +8,21 @@ location __PATH__ { rewrite ^ https://$server_name$request_uri? permanent; } + location ~ 403 { + rewrite ^(.*)$ /include/ redirect; + rewrite ^(.*)$ /cache/ redirect; + rewrite ^(.*)$ /plugins/ redirect; + rewrite ^(.*)$ /templates/ redirect; + rewrite ^(.*)$ /.*.sqlite redirect; + rewrite ^(.*)$ /.*.log redirect; + rewrite ^(.*)$ /(README|VERSION|COPYING) redirect; + rewrite ^(.*)$ /config\.(.*)\.php redirect; + } + try_files $uri $uri/ index.php /_route.php; index index.php /_route.php; location ~ [^/]\.php(/|$) { - try_files $uri $uri/ /_route.php; fastcgi_split_path_info ^(.+?\.php)(/.*)$; fastcgi_pass unix:/var/run/php/php7.0-fpm-__NAME__.sock; fastcgi_index index.php;