diff options
| author | MaZderMind | 2014-10-14 13:41:08 +0200 |
|---|---|---|
| committer | MaZderMind | 2014-10-14 13:41:08 +0200 |
| commit | ab87cf1cf59edffde2be404251ffb1013b67fc2d (patch) | |
| tree | 7d2b6b4e1d3dad27828f184a631fe39011ce10be /lib | |
| parent | 869303b5263f3f2f77cd59fe035bca075697db49 (diff) | |
avoid double-slash when served from the root domain
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/helper.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/helper.php b/lib/helper.php index 7f5c6ce..5ae027b 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -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; } |
