From 6a3c4887f905759d94517ced6333551d4b2a2a7a Mon Sep 17 00:00:00 2001 From: Bernat Arlandis Date: Wed, 18 Jan 2017 10:50:07 +0100 Subject: [PATCH] Fix base path with query params in builtin server --- app/webroot/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/webroot/index.php b/app/webroot/index.php index 2bf59fd46..15643e4c6 100644 --- a/app/webroot/index.php +++ b/app/webroot/index.php @@ -82,7 +82,7 @@ if (!defined('WWW_ROOT')) { // For the built-in server if (PHP_SAPI === 'cli-server') { - if ($_SERVER['REQUEST_URI'] !== '/' && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) { + if ($_SERVER['PHP_SELF'] !== '/' . basename(__FILE__) && file_exists(WWW_ROOT . $_SERVER['PHP_SELF'])) { return false; } $_SERVER['PHP_SELF'] = '/' . basename(__FILE__);