Base URL Setting in Codeigniter

Copy below code and paste inside the config.php file in Codeigniter . You will get this file in Application/Config/config.php 


$config['base_url'] = $config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ?  "https" : "http")."://".$_SERVER['HTTP_HOST'].str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

Comments

Popular posts from this blog