How can I have CodeIgniter load specific pages using SSL?

前端 未结 10 1259
礼貌的吻别
礼貌的吻别 2020-11-30 06:40

How can I have CodeIgniter load specific pages using SSL? I have an apache2/mode_ssl server. mod_ssl uses a different document root than non-secure

10条回答
  •  悲哀的现实
    2020-11-30 07:18

    another question is similar to this

    you can use a protocol-relative url which will keep persistence in the linking in CI.

    in your config.php instead of:

    $config['base_url'] = 'http://example.com/';
    

    put;

    $config['base_url'] = '//example.com/';
    

    information about protocol-relative links here.

提交回复
热议问题