php WordPress混合内容错误

ewm0tg9j  于 2022-10-30  发布在  PHP
关注(0)|答案(3)|浏览(108)

我在多站点环境中有3个站点。我也为管理部分启用了SSL。但是我只在一个站点的管理中得到了很多“混合内容”错误。结果是管理中的很多脚本和样式表都被破坏了。
如果我的htaccess规则wp_config文件有问题,那么其他网站也应该有同样的问题。但是其他两个网站工作正常。
我在所有三个网站上安装了几乎相同的插件。我尝试停用插件。还尝试使用基本的Wordpress 2015主题,但没有成功。因此,我排除了****插件和主题作为此问题的原因。
有人能解释一下为什么会发生这种情况吗?

Blocked loading mixed display content "http://sitename/wp-includes/js/thickbox/loadingAnimation.gif"

Blocked loading mixed active content "http://sitename/wp-content/plugins/capsman/framework/styles/admin.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/capsman/admin.css?ver=1.3.2"

Blocked loading mixed active content "http://sitename/wp-content/plugins/capsman/framework/styles/admin.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/capsman/admin.css?ver=1.3.2"

Blocked loading mixed display content "http://sitename/wp-content/themes/pagelines/sections/boxes/icon.png"

Blocked loading mixed display content "http://sitename/wp-content/themes/pagelines/sections/features/icon.png"

Blocked loading mixed display content "http://sitename/wp-content/themes/pagelines/sections/banners/icon.png"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/custom-status/lib/custom-status.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/wordpress-seo/css/edit-page.min.css?ver=2.1.1"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/editorial-metadata/lib/editorial-metadata.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/css/edit-flow-admin.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/captcha/css/style.css?ver=4.2.2"

Blocked loading mixed active content "http://sitename/wp-content/plugins/ig-analytics//assets/css/admin.css?ver=1.3"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/css/jquery.ui.datepicker.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/css/jquery.ui.theme.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/css/jquery.listfilterizer.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/notifications/lib/notifications.css?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/user-groups/lib/user-groups.css?ver=0.8"

Blocked loading mixed display content "http://sitename/files/2015/06/500201259536538-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/06/Econsultancy-Mobile-Survey-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/06/ThinkstockPhotos-482221483-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/06/seo-localization-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/ID-10091333-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/South-Korea-Flag-On-Hand-100x100.jpg"

Blocked loading mixed active content "http://sitename/wp-content/plugins/search-everything/static/css/admin.css?ver=8.1.3"

Blocked loading mixed active content "http://sitename/wp-content/plugins/search-everything/static/css/se-compose.css?ver=8.1.3"

Blocked loading mixed active content "http://sitename/wp-content/plugins/ig-analytics//assets/js/admin.js?ver=1.3"

Blocked loading mixed active content "http://sitename/wp-content/plugins/search-everything/static/js/searcheverything.js?ver=8.1.3"

Blocked loading mixed active content "http://sitename/wp-content/themes/pagelines/admin/css/admin.css?ver=2.4.6"

Blocked loading mixed display content "http://sitename/files/2015/05/Australian-Landscape-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/Australian-Flag-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/Digital-Content-Strategy-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/dms15_singapore_sydney_banner_900x600px-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/Digital-Directionsl-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/04/2015_gartner_mq_mccm_1600x900-1200x675-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/mobile-marketing-asia-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/04/mobile-video-marketing-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/03/2400x800-Landing-pg-Banner2-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/04/dms15_singapre_sydney_banner_3400x2267-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/04/Nissan-Motor-Corporation_Final-100x100.jpg"

Blocked loading mixed display content "http://sitename/wp-content/plugins/bwp-google-xml-sitemaps/images/icon_menu.png"

Blocked loading mixed display content "http://sitename/wp-content/plugins/captcha/images/px.png"

Blocked loading mixed display content "http://sitename/wp-content/plugins/edit-flow/modules/settings/lib/eflogo_s32.png"

Blocked loading mixed active content "http://sitename/wp-includes/js/wp-emoji-release.min.js?ver=4.2.2"

Blocked loading mixed active content "http://sitename/wp-content/plugins/search-everything/static/js/searcheverything.js?ver=8.1.3"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/custom-status/lib/custom-status.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/wordpress-seo/js/wp-seo-admin-global.min.js?ver=2.1.1"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/jquery-ui-timepicker-addon.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/ef_date.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/calendar/lib/calendar.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/jquery.listfilterizer.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/jquery.quicksearch.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/notifications/lib/notifications.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/user-groups/lib/user-groups.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/themes/pagelines/admin/css/admin.css?ver=2.4.6"

Blocked loading mixed display content "http://sitename/wp-content/themes/pagelines/sections/boxes/icon.png"

Blocked loading mixed display content "sitename/wp-content/themes/pagelines/sections/features/icon.png"

Blocked loading mixed display content "http://sitename/wp-content/themes/pagelines/sections/banners/icon.png"

Blocked loading mixed display content "http://sitename/files/2015/06/500201259536538-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/06/Econsultancy-Mobile-Survey-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/06/ThinkstockPhotos-482221483-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/06/seo-localization-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/ID-10091333-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/South-Korea-Flag-On-Hand-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/Australian-Landscape-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/Australian-Flag-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/Digital-Content-Strategy-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/dms15_singapore_sydney_banner_900x600px-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/Digital-Directionsl-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/dms15_singapore_sydney_banner_900x600px-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/04/2015_gartner_mq_mccm_1600x900-1200x675-100x100.jpg"

Blocked loading mixed display content "http://sitename/files/2015/05/mobile-marketing-asia-100x100.jpg"

Blocked loading mixed display content "http://sitename/wp-content/plugins/captcha/images/px.png"

Blocked loading mixed display content "http://sitename/wp-content/plugins/edit-flow/modules/settings/lib/eflogo_s32.png"

Blocked loading mixed display content "http://sitename/wp-content/plugins/bwp-google-xml-sitemaps/images/icon_menu.png"

Blocked loading mixed active content "http://sitename/wp-content/plugins/wordpress-seo/js/wp-seo-admin-global.min.js?ver=2.1.1"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/jquery-ui-timepicker-addon.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/ef_date.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/calendar/lib/calendar.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/custom-status/lib/custom-status.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/jquery.listfilterizer.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/common/js/jquery.quicksearch.js?ver=0.8"

Blocked loading mixed active content "http://sitename/wp-content/plugins/edit-flow/modules/notifications/lib/notifications.js?ver=0.8"
wlsrxk51

wlsrxk511#

将以下代码添加到wp-config.php中:

$_SERVER['HTTPS'] = 'on';
kpbwa7wx

kpbwa7wx2#

我将逐步指导您如何轻松解决此错误:
步骤#1:首先,你需要确定混合内容在哪里,要确定混合内容请在谷歌浏览器中打开您的网站,并右键单击您的网站网页,然后选择检查元素,当检查元素打开时,请单击控制台,看看混合内容在哪里见下图

步骤#2:你注意到在上面的图像混合内容的问题发生时,我们正在加载一些数据从不安全的网站,所以主机上的所有图像和数据您的网站。
这样我解决了我的网站混合内容的问题,我希望它的工作你的。

m1m5dgzv

m1m5dgzv3#

由于这些答案没有解决我的问题,希望我的答案能帮助到其他人:

只需补充一句:

Header always set Content-Security-Policy "upgrade-insecure-requests"

\opt\bitnami\apache\conf\httpd.conf,位于“User daemon”和“Group daemon”的正下方,第177行附近,任何<IfModule>标记之外。
我的设置是一个正常的WordPress应用程序运行在AWS Lightsail与SSL启用通过Apache
这会自动将所有基于HTTP的请求转换为HTTPS。有关详细信息,请阅读this

相关问题