CodeIgniter Forums
Force SSL for the site - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Force SSL for the site (/showthread.php?tid=75534)



Force SSL for the site - Mekaboo - 02-18-2020

Hello all!

I have a CI based site with an SSL certificate but it's not fully connecting and it's not loading everything properly..how do I force the https to work on the site?

Heart Heart ,
Mekaboo


RE: Force SSL for the site - dbrooke - 02-18-2020

Hi, what platform? cPanel has this kind of redirect built in. Could also force HTTPS in .htacess (which you can google).

Make sure to set your $config['base_url']
in application/config/config.php

to your https base url.

I also redirect www URL's as well in .htacess.


RE: Force SSL for the site - Mekaboo - 02-18-2020

(02-18-2020, 09:35 AM)dbrooke Wrote: Hi, what platform? cPanel has this kind of redirect built in. Could also force HTTPS in .htacess (which you can google).

Make sure to set your $config['base_url']
in application/config/config.php

to your https base url.

I also redirect www URL's as well in .htacess.
Thank ya kindly  Heart

I have a Cpanel (HostGator)...will look into that later on as well as changing things within the config file. Thanks again!!!


RE: Force SSL for the site - InsiteFX - 02-18-2020

You need to change all http calls to https, if you use base_url then just changing that
should fix all the rest.


RE: Force SSL for the site - Mekaboo - 02-18-2020

(02-18-2020, 04:32 PM)InsiteFX Wrote: You need to change all http calls to https, if you use base_url then just changing that
should fix all the rest.
Thank ya kindly  Heart

Will make adjustment very soon!!!


RE: Force SSL for the site - dbrooke - 02-19-2020

(02-18-2020, 09:40 AM)Mekaboo Wrote: Thank ya kindly  Heart

I have a Cpanel (HostGator)...will look into that later on as well as changing things within the config file. Thanks again!!!


It's in the 'Domains' utility (force https redirect).


RE: Force SSL for the site - Mekaboo - 02-19-2020

(02-19-2020, 09:51 AM)dbrooke Wrote:
(02-18-2020, 09:40 AM)Mekaboo Wrote: Thank ya kindly  Heart

I have a Cpanel (HostGator)...will look into that later on as well as changing things within the config file. Thanks again!!!


It's in the 'Domains' utility (force https redirect).
I changed the base url and it worked Smile