【发布时间】:2016-10-24 13:59:25
【问题描述】:
我需要让 www.riversdown.com 完全安全。
当我在 FF 中查看网站时,每个页面都会加载。当我在 Chrome 或 Safari 中查看它时,主页加载正常,但所有其他页面都没有,因为它给出了混合内容错误。有些页面可以正常加载,有些则不能,但这些页面会随着时间的推移而发生变化。
如果我查看 css 文件的源代码,例如,在 FF 中,我会看到:
<link rel='stylesheet' id='mine-css' href='https://www.riversdown.com/wp-content/themes/riversdown/_/css/style.css?ver=all' type='text/css' media='all' />
但在其他两个浏览器中我看到了:
<link rel='stylesheet' id='mine-css' href='http://www.riversdown.com/wp-content/themes/riversdown/_/css/style.css?ver=all' type='text/css' media='all' />
似乎任何 WP 生成的链接(通过 get_template_directory_uri() 或 bloginfo('template_directory') 都没有被强制使用 https://
在设置中,我将 WordPress 和站点地址都设置为 https://
我曾尝试使用插件:“SSL Insecure Content Fixer”和“Really Simple SSL”,但它们似乎没有帮助。
在我写这篇文章时,以下页面无法正常工作: https://www.riversdown.com/why-choose-us/12-reasons-to-choose-us/
https://www.riversdown.com/learn-english/true-immersion/
https://www.riversdown.com/our-locations/rlc-sweden/stockholm-main-office/
【问题讨论】:
-
所有永久链接和图像 URL 在我遇到问题的页面中都可以正常工作,这似乎是模板或插件中的 php 生成的 URL。
-
我也试过在我的 .htaccess 中添加这个: # START # # Force HTTPS RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] # END # 但是浏览器根本打不开页面,出现重定向过多的问题。
标签: wordpress ssl mixed-content