Reputation: 51
i have problem using https connection like (https://www.bla.com/logout) in codeigniter,its working when im using http like (http://www.bla.com/logout) only. Any ideas regarding this? Please help me
SECURED
[https]www.bla.com/index.php/logout -working
[https]www.bla.com/logout - not working
NON SECURED
[http]www.bla.com/logout - working
Upvotes: 1
Views: 2625
Reputation: 498
I have same problem with you. In my case, the problem is that I set "AllowOverride All" for non ssl directory and "AllowOverride None" for ssl directory in my httpd.conf.
Please make sure that "AllowOverride" option is set to "AllowOverride All" in your httpd.conf for both SSL and non SSL directory.
<Directory "/var/www/nonssl_dir/">
...
AllowOverride All
...
</Directory>
<Directory "/var/www/ssl_dir/">
...
AllowOverride All
...
</Directory>
Upvotes: 2
Reputation: 81
First of all you need to make sure that you already installed SSL on your server. If you don't have SSL certificate, you can buy a SSL certificate from 3rd party service like Go Daddy or else. Then install it to your server.
After that you can test the SSL ready by calling the https protocol, like: https://www.bla.com/
If it works, then you just need to add some code on your Code Igniter config file to handle the SSL, something like this:
$config['base_url'] = ($_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http') . "://example.com/";
Upvotes: 0