From: Andreas Neustifter Date: Thu, 28 Jun 2018 19:15:06 +0000 (+0000) Subject: [nginx] Use try_file instead of if. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6a85b345041644c26b4632938bd3cdffbedcc1cb;p=friendica.git [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. --- 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