我的网站是https,现在我想包括iframe是http,所以我怎么能使一个页面只有http从https


My site is https, now i want to include iframe that are http, so how can i make a page only http from https.

我的网站是https安全的。我只想做一个不安全的页面,就像www.mysite.com/fafoo

Background: My site is wordpress and i am using bellow codes in htaccess
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www'.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

我的目标是使用不安全的网站在iframe

  • 你不能在https网页中包含http iframe

"但是如果iframe是https,然后重定向到http呢?"

  • 在https网页中,重定向到https的iframe也会被阻止。

这是一个安全机制(阻止活跃的混合内容):https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content