From b74cad4aa8a9941797ac748b7730e3f81b79d5b4 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 8 Oct 2017 14:06:09 +0200 Subject: [PATCH] Fixed issue if home_url was '/' --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 589fe14..1025365 100755 --- a/index.php +++ b/index.php @@ -22,8 +22,9 @@ if (file_exists('config/config.yml')) $page->error_reporting = E_ALL & ~E_NOTICE; //Set Url - $page->setUrl(str_replace($MCONF['home_uri'], '', $_SERVER['REQUEST_URI'])); - $base = explode('/', str_replace($MCONF['home_uri'], '', $_SERVER['REQUEST_URI'])); + $url = str_replace_first($MCONF['home_uri'], '', $_SERVER['REQUEST_URI']); + $page->setUrl($url); + $base = explode('/', $url); $page->setBaseUrl('/'); if (count($base) > 1) {