Fixed issue if home_url was '/'

This commit is contained in:
kolaente 2017-10-08 14:06:09 +02:00
parent e8b972543c
commit b74cad4aa8
1 changed files with 3 additions and 2 deletions

View File

@ -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)
{