[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.
This commit is contained in:
parent
79a8320fed
commit
6a85b34504
1 changed files with 1 additions and 3 deletions
|
@ -84,9 +84,7 @@ server {
|
||||||
|
|
||||||
# rewrite to front controller as default rule
|
# rewrite to front controller as default rule
|
||||||
location / {
|
location / {
|
||||||
if (!-e $request_filename) {
|
try_file $uri /index.php?pagename=$uri&$args;
|
||||||
rewrite ^(.*)$ /index.php?pagename=$1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# make sure webfinger and other well known services aren't blocked
|
# make sure webfinger and other well known services aren't blocked
|
||||||
|
|
Loading…
Reference in a new issue