See https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/?utm_source=tool.lu#check-if-file-exists.
# rewrite to front controller as default rule
location / {
# 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
}
# make sure webfinger and other well known services aren't blocked