From 0968505acb7a6768ac6ecbc7b6cf3156dc1676d5 Mon Sep 17 00:00:00 2001 From: Bart van den Burg Date: Tue, 6 May 2014 13:41:37 +0200 Subject: [PATCH] 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 --- cookbook/configuration/web_server_configuration.rst | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cookbook/configuration/web_server_configuration.rst b/cookbook/configuration/web_server_configuration.rst index 647cb5c0d01..717f030ef66 100644 --- a/cookbook/configuration/web_server_configuration.rst +++ b/cookbook/configuration/web_server_configuration.rst @@ -77,13 +77,8 @@ are: root /var/www/project/web; location / { - # try to serve file directly, fallback to rewrite - try_files $uri @rewriteapp; - } - - location @rewriteapp { - # rewrite all to app.php - rewrite ^(.*)$ /app.php/$1 last; + # try to serve file directly, fallback to app.php + try_files $uri /app.php$is_args$args; } location ~ ^/(app|app_dev|config)\.php(/|$) {