//Place the below code in the index.php file of codeigniter framework
<?php
if($_SERVER['HTTPS']!="on"){
if(substr($_SERVER['REQUEST_URI'],0,1)=='/'){
header('Location: https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
}else{
header('Location: https://'.$_SERVER['HTTP_HOST'].'/'.$_SERVER['REQUEST_URI']);
}
}
0 comments:
Post a Comment