avoid double-slash when served from the root domain

This commit is contained in:
MaZderMind 2014-10-14 13:41:08 +02:00
parent 869303b526
commit ab87cf1cf5

View file

@ -22,7 +22,7 @@ function baseurl()
$base = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? 'https://' : 'http://';
$base .= $_SERVER['HTTP_HOST'];
$base .= dirname($_SERVER['SCRIPT_NAME']).'/';
$base .= rtrim(dirname($_SERVER['SCRIPT_NAME']), '/').'/';
return $base;
}