First go to the application/config/config.php file and look for this line:
$config[‘base_url’] = “”;
Set it to your URL with the https e.g. https://example.com
$config[‘base_url’] = “https://example.com”;
Then go to your .htaccess file and add this line in the example given below.
Read Full Article At : https://13facts.info/2018/11/redirect-http-https-codeignitor/