To get host url of current server simply replace
application\config\config.php
1 |
$config['base_url'] = ''; |
with
1 2 3 4 5 6 |
// Home URL $sysurl = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http"); $sysurl .= "://" . $_SERVER['HTTP_HOST']; $sysurl .= str_replace(basename($_SERVER['SCRIPT_NAME']), "", $_SERVER['SCRIPT_NAME']); $config['base_url'] = $sysurl; |