【发布时间】:2015-06-26 17:32:18
【问题描述】:
我在 codeigniter 中实现了一个网站,最近我将它上传到了具有 SSL 的生产服务器。
问题是,如果我使用“http”输入,一切正常。如果我使用 "https" 输入,则找不到所有 css 和 js。错误是:
Mixed Content: The page at 'https://www.xxxx.com/' was loaded over a secure connection, but contains a form which targets an insecure endpoint 'http://www.xxxx.com/secure/validate_credentials'. This endpoint should be made available over a secure connection.
Mixed Content: The page at 'https://www.xxxx.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://www.xxxx.com/assets/font-awesome/css/font-awesome.css'. This request has been blocked; the content must be served over HTTPS.
我已经在 codeigniter 中编辑了 config.php
例如$config['base_url'] = "https://www.xxxx.com/"
但还是会发生,如何调试和修复?感谢您的帮助
【问题讨论】:
-
你试过这样的
$config['base_url'] = "//www.xxxx.com/" -
谢谢我去试试
-
它可以获取 js/css ,但是当我转到每个页面时,它都会重定向到xxxx.com/www.xxxx.com
标签: javascript php css codeigniter ssl