Skip to content

Commit 0968505

Browse files
committed
remove unnecessary rewrite from nginx conf
It is unnecessary to rewrite to a different URL when you can simply have the request be handled by app.php
1 parent 127beed commit 0968505

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cookbook/configuration/web_server_configuration.rst

+2-7
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,8 @@ are:
7777
root /var/www/project/web;
7878
7979
location / {
80-
# try to serve file directly, fallback to rewrite
81-
try_files $uri @rewriteapp;
82-
}
83-
84-
location @rewriteapp {
85-
# rewrite all to app.php
86-
rewrite ^(.*)$ /app.php/$1 last;
80+
# try to serve file directly, fallback to app.php
81+
try_files $uri /app.php$is_args$args;
8782
}
8883
8984
location ~ ^/(app|app_dev|config)\.php(/|$) {

0 commit comments

Comments
 (0)