[nginx] Use try_files instead of if for /.well-known/.

See https://www.nginx.com/resources/wiki/start/topics/depth/ifisevil/
This commit is contained in:
Andreas Neustifter 2018-06-28 04:43:33 +00:00
parent f44cb1ccce
commit 79a8320fed

View File

@ -93,9 +93,7 @@ server {
# by denying dot files and rewrite request to the front controller # by denying dot files and rewrite request to the front controller
location ^~ /.well-known/ { location ^~ /.well-known/ {
allow all; allow all;
if (!-e $request_filename) { try_files $uri /index.php?pagename=$uri&$args;
rewrite ^(.*)$ /index.php?pagename=$1;
}
} }
include mime.types; include mime.types;