CodeIgniter Forums
base_url security - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6)
+--- Forum: CodeIgniter 3.x (https://forum.codeigniter.com/forumdisplay.php?fid=17)
+--- Thread: base_url security (/showthread.php?tid=76387)



base_url security - az1409 - 05-08-2020

Hi all,

Is there any way to secure below base_url in CI(3.1.10)

$config['base_url'] = 'http://' . $_SERVER['HTTP_HOST']


Thanks in advance


RE: base_url security - php_rocs - 05-08-2020

@az1409,

When you say secure are you talking about SSL or HTTPS?


RE: base_url security - jreklund - 05-08-2020

You can do it like this.
https://codeigniter.com/userguide3/installation/upgrade_300.html?highlight=multiple#step-19-make-sure-your-base-url-config-value-is-not-empty


RE: base_url security - az1409 - 05-10-2020

(05-08-2020, 09:33 AM)php_rocs Wrote: @az1409,

When you say secure are you talking about SSL or HTTPS?

No.


Unfortunately, the site is on HTTP.

(05-08-2020, 09:42 AM)jreklund Wrote: You can do it like this.
https://codeigniter.com/userguide3/installation/upgrade_300.html?highlight=multiple#step-19-make-sure-your-base-url-config-value-is-not-empty
ThanksĀ !!