From: Iain Patterson Date: Mon, 4 Apr 2016 15:13:16 +0000 (-0400) Subject: Fixed parsing parameters in rewrite. X-Git-Tag: 2016-04-05^0 X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=1a748a92f1782578b896c7dbfecb353587c49fe8;p=readifood.git Fixed parsing parameters in rewrite. A rewritten URL which was passed a query parameter would be parsed incorrectly. For instance /contact/search/smith?page=2 would be treated as a search for a contact whose name was 'smith?page=2' rather than the second page of a search for the 'smith' contact. --- diff --git a/www/index.php b/www/index.php index 340401d..e181d08 100644 --- a/www/index.php +++ b/www/index.php @@ -13,7 +13,7 @@ Propel::init("$propel_root/build/conf/$propel_project-conf.php"); set_include_path(join(PATH_SEPARATOR, array(join(DIRECTORY_SEPARATOR, array($propel_root, "build", "classes")), get_include_path()))); - $request = preg_replace('!^/branches/[^/]+/!', "", $_SERVER['REQUEST_URI']); + $request = preg_replace('!^/branches/[^/]+/!', "", $_SERVER['SCRIPT_URL']); $request = preg_replace('!^/+!', "", $request); $request = preg_replace('!/+$!', "", $request);