diff --git a/application/config/config.php b/application/config/config.php index dbf47cc..aea6d2f 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -24,9 +24,13 @@ | */ // $config['base_url'] = ''; -$http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '') . '://'; +/* $http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '') . '://'; $newurl = str_replace("index.php","", $_SERVER['SCRIPT_NAME']); -$config['base_url'] = "$http" . $_SERVER['SERVER_NAME'] . "" . $newurl; +$config['base_url'] = "$http" . $_SERVER['SERVER_NAME'] . "" . $newurl; */ + +$root=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST']; +$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']); +$config['base_url'] = $root; /* |--------------------------------------------------------------------------