Wordpress中的混合内容异常 [英] Mixed Content Exception in Wordpress

查看:126
本文介绍了Wordpress中的混合内容异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在提交集成到wordpress网站的Ninja表单时出现以下错误.

I'm getting the following error when submitting a Ninja form that was integrated to the wordpress site.

Mixed Content: The page at 'https://my.domain/event/test-page/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://my.domain/wp-admin/admin-ajax.php'. This request has been blocked; the content must be served over HTTPS. 

那是我得到的唯一错误. 该站点在HTTPS中运行. 快速帮助是最大的赞赏.

That is the only error that I'm getting. The site runs in HTTPS. A quick help is utmost appreciated.

推荐答案

您可以尝试强制所有http请求重定向到https.这是一种解决此类问题的钝器,但并不美观. 将其放在#BEGIN WordPress行上方的.htaccess文件中

You could try forcing all http requests to redirect to https. This is a blunt-force tool to solve issues like this, but not elegant. Place this in your .htaccess file above the #BEGIN WordPress line

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

这篇关于Wordpress中的混合内容异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆