我正在尝试使用SSL保护网站。已安装SSL,但当我访问该网站时,我从Chrome获取此信息:
Your connection to domain.com is encrypted with 256-bit encryption. However, this page includes other resources which are not secure.
我想我已经更新了所有内容以使用SSL站点中的资源。我甚至复制了XHTML DTD并将其存储在本地。 我做错了什么?以下是示例页面:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://secured.CompanyName.com/schemas/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" class="frontend">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>CompanyName</title>
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<script type="text/javascript" src="https://secured.CompanyName.com/scripts/jquery.1.4.4.min.js"></script>
<link media="all" type="text/css" href="https://secured.CompanyName.com/styles/jquery-ui/jquery-ui-1.8.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="https://secured.CompanyName.com/scripts/jquery-ui.1.8.2.min.js"></script>
<script type="text/javascript" src="https://secured.CompanyName.com/scripts/jquery.layout.min.js"></script>
<link href="https://secured.CompanyName.com/styles/login.css" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
<link media="all" type="text/css" href="https://secured.CompanyName.com/styles/CompanyName_main.css" rel="stylesheet" />
</head>
<body id="doc3" class="yui-t6">
<div id="site_wrapper">
<div class="CompanyName_header">
<div class="logo">
</div>
<div class="message" id="message" style="display:none;">
<p>Successfully saved.</p>
</div>
</div>
<div id="body_wrapper">
<div id="login_wrapper">
<form enctype="multipart/form-data" method="post" action="https://secured.CompanyName.com/index.php/main/login/submit/">
<div id="login_content">
<div id="square1"></div>
<div id="square2"></div>
<div id="square3"></div>
<div id="square4"></div>
<div id="login_header">
Login
</div>
<div class="login_email">
<label for="email">Email Address:</label><input type="text" name="email" id="email" />
</div>
<div class="login_password">
<label for="password">Password:</label><input type="password" name="password" id="password" />
</div><input type="submit" name="submit" value="Login" class="login" />
</div>
</form>
</div>
<div id="login_wrapper-shadow">
</div>
</div>
</div>
<div id="ft" class="ui-layout-south CompanyName_footer">
<div class="content">
<p>© 2010 <span class="name">CompanyName</span>. All rights reserved.</p>
</div>
</div>
</body>
</html>
答案 0 :(得分:2)
如果您查看开发人员控制台,它应该告诉您哪些资源被不正确地包含在内。不幸的是,即使你做了任何正确的事情,你所包含的脚本或资源也可能不正确地包含HTTP资源本身。例如,您的CSS文件可能包含HTTP上的图像,或者您的JavaScript可能会将其他脚本或图像注入到使用HTTP的DOM中。
此外,仅供参考,如果您希望允许您的网站包含在HTTP和HTTPS下,则可以在引用资源时使用“//”而不是“https://”;这将确保从HTTP页面访问时在HTTP下加载资源,并在从HTTPS页面访问时加载HTTPS。使用像这样的协议相对路径是有利的,原因如下: