Skip to content

Commit 0b06287

Browse files
committed
minor #3836 remove unnecessary rewrite from nginx conf (Burgov)
This PR was merged into the 2.3 branch. Discussion ---------- 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 Commits ------- 0968505 remove unnecessary rewrite from nginx conf
2 parents d8aaac3 + 0968505 commit 0b06287

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)