diff options
author | Andrey Andreev <narf@devilix.net> | 2014-10-10 14:40:56 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-10-10 14:40:56 +0200 |
commit | f35ae5eb7fc81b1c6a903591c6ff56103e6e247f (patch) | |
tree | fa5e4fcca857428a996e1c60e5ef9e300b5f18e0 /system/core | |
parent | 1c77aabf1aa0e860a3dc739d702dc8ff8dbdc907 (diff) |
Fix #3270
Related: #3268, 4bdb66759c24c41fefec7952b12a0595a671eaa2
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Config.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/system/core/Config.php b/system/core/Config.php index 18380a0db..ee738d752 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -78,11 +78,8 @@ class CI_Config { { if (isset($_SERVER['HTTP_HOST'])) { - $base_url = (is_https() ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].'/'; - if ( ! empty($_SERVER['DOCUMENT_ROOT'])) - { - $base_url .= ltrim(str_replace('\\', '/', substr(FCPATH, strlen($_SERVER['DOCUMENT_ROOT']))), '/\\'); - } + $base_url = (is_https() ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'] + .substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME']))); } else { |