From 6a85b345041644c26b4632938bd3cdffbedcc1cb Mon Sep 17 00:00:00 2001 From: Andreas Neustifter Date: Thu, 28 Jun 2018 19:15:06 +0000 Subject: [PATCH] [nginx] Use try_file instead of if. See https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/?utm_source=tool.lu#check-if-file-exists. --- mods/sample-nginx.config | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mods/sample-nginx.config b/mods/sample-nginx.config index 0c5443828c..e4ce902515 100644 --- a/mods/sample-nginx.config +++ b/mods/sample-nginx.config @@ -84,9 +84,7 @@ server { # rewrite to front controller as default rule location / { - if (!-e $request_filename) { - rewrite ^(.*)$ /index.php?pagename=$1; - } + try_file $uri /index.php?pagename=$uri&$args; } # make sure webfinger and other well known services aren't blocked -- 2.39.5