From cfee8ea25d0507b3f2334b186ae04097b708fddc Mon Sep 17 00:00:00 2001 From: DougHW Date: Tue, 10 Jun 2014 18:58:50 -0700 Subject: [PATCH] Need to pass query string If you don't pass $query_string along with try_files, $_SERVER['QUERY_STRING'] ends up empty in PHP. This causes Environment.php to calculate routes like "testfoo=bar", when it should be just "test". --- 03-routing/15-rewriting/page.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/03-routing/15-rewriting/page.md b/03-routing/15-rewriting/page.md index 4032bbe..7e1d6fb 100644 --- a/03-routing/15-rewriting/page.md +++ b/03-routing/15-rewriting/page.md @@ -77,7 +77,7 @@ good for static files (images, css, js etc), and otherwise forward it on to the server_name www.mysite.com mysite.com; root /path/www.mysite.com/public_html; - try_files $uri /index.php; + try_files $uri /index.php?$query_string; # this will only pass index.php to the fastcgi process which is generally safer but # assumes the whole site is run via Slim.