Welcome Guest, Not a member yet? Register   Sign In
CI & HTTPS
#1

[eluser]glopglop[/eluser]
Hi folks,
I spent some times looking at the documentation and the forum.
CI seems to fit completely my needs but some posts and wiki comments
around HTTPS support or non support make me post today.

As HTTPS is mandatory for me, are there some limitations with CI ?


Thanks for your time & comments;
#2

[eluser]WanWizard[/eluser]
No, http:// or https:// is completely transparent to CI.

Offcourse, you app should be designed properly, so a change of base_url in config/config.php from http:// to https:// should change all links generated by your application.
#3

[eluser]glopglop[/eluser]
Thanks a lot for your response.

Looks like I am going to be around for some months ;o)
#4

[eluser]Agustín Villalba[/eluser]
Maybe this code can help you:

Code:
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
if (!isset($_SERVER['ORIG_SCRIPT_NAME']))
{
  $config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
}
else
{
  $config['base_url'] .= str_replace(basename($_SERVER['ORIG_SCRIPT_NAME']),"",$_SERVER['ORIG_SCRIPT_NAME']);
}

Or take a look to this post (is in Spanish): Automatic URLs in CodeIgniter

Bye!




Theme © iAndrew 2016 - Forum software by © MyBB