Prevent double slashes in base_url when installed to document root
Fixes #274
This commit is contained in:
parent
c72ea0ecec
commit
f5006c036a
@ -1220,7 +1220,7 @@ class Pico
|
|||||||
|
|
||||||
$this->config['base_url'] =
|
$this->config['base_url'] =
|
||||||
$protocol . "://" . $_SERVER['HTTP_HOST']
|
$protocol . "://" . $_SERVER['HTTP_HOST']
|
||||||
. dirname($_SERVER['SCRIPT_NAME']) . '/';
|
. rtrim(dirname($_SERVER['SCRIPT_NAME']), '/') . '/';
|
||||||
|
|
||||||
return $this->getConfig('base_url');
|
return $this->getConfig('base_url');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user