diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Config.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Config.php b/system/core/Config.php index f630d1709..ad0e5f981 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -78,9 +78,9 @@ class CI_Config { { if (isset($_SERVER['HTTP_HOST'])) { - $base_url = is_https() ? 'https' : 'http'; - $base_url .= '://'.$_SERVER['HTTP_HOST'] - .str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); + $base_url = (is_https() ? 'https' : 'http') + .'://'.$_SERVER['HTTP_HOST'] + .substr($_SERVER['SCRIPT_NAME'], 0, -strlen(basename($_SERVER['SCRIPT_NAME']))); } else { |