将Codeigniter网站从http更改为https网站

编程入门 行业动态 更新时间:2024-10-19 14:27:04
本文介绍了将Codeigniter网站从http更改为https网站 - 无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个codeigniter网站,当它在 http 中工作完美。

I have a codeigniter site ,that working perfectly when it is in http.

网站到新服务器有 https 安全。

Then our client moved the site to new server which have the https security.

这意味着现在网站的URL是 mysite 。

That means now the site url is mysite.

但现在我的网站无法正常运作...

But now my site is not working correctly...

这是什么原因?

这是我的codeigniter网站不能在 https 。

That is my codeigniter site not working in https.

它只是显示主页,没有jquery效果等不工作..

It just display the home page ,and no jquery effects etc are not working..

我已经改变了config.php中的 base_url 为 mysite 。

I already changed the base_url in config.php as mysite.

推荐答案

尝试此

function redirectToHTTPS() { if($_SERVER['HTTPS']!="on") { $redirect= "".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header("Location:$redirect"); } }

更多推荐

将Codeigniter网站从http更改为https网站

本文发布于:2023-11-01 12:48:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549376.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:网站   Codeigniter   https   http

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!