Reputation: 3267
I have a codeigniter site ,that working perfectly when it is in http
.
Then our client moved the site to new server which have the https
security.
That means now the site url is http://mysite.com
.
But now my site is not working correctly...
What is the reason for that?
That is my codeigniter site not working in https
.
It just display the home page ,and no jquery effects etc are not working..
I already changed the base_url
in config.php as https://mysite.com
.
Upvotes: 0
Views: 4123
Reputation: 2703
Try this
function redirectToHTTPS()
{
if($_SERVER['HTTPS']!="on")
{
$redirect= "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header("Location:$redirect");
}
}
Upvotes: 2