diff --git a/conf/nginx.conf b/conf/nginx.conf index 4031a35..f6ad844 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,10 +5,10 @@ location ^~ __PATH__/ { # Path to source alias __FINALPATH__/public/; - try_files $uri $uri/ =404; + try_files $uri $uri/ index.php?q=; if (!-e $request_filename) { - rewrite ^(.+)$ /index.php?q= last; + rewrite ^(.+)$ __PATH__/index.php?q= last; } # Add headers to serve security related headers @@ -52,7 +52,7 @@ location ^~ __PATH__/ { } location ~* \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ { - try_files $uri __FINALPATH__/index.php$request_uri; + try_files $uri __FINALPATH__/public/index.php$request_uri; # Optional: Don't log access to other assets access_log off; }