Define base url in CI

#Base_url() defining in CodeIgniter 
Changes are made in config/config.php file. 

if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on"){
    $ssl_set = "s";
} else{
   $ssl_set = "";
}

$config['base_url'] = 'http'.$ssl_set.'://'.$_SERVER['HTTP_HOST'].'/';

Please follow and like us:
0

Leave a Reply

Your email address will not be published. Required fields are marked *