我的网站是https,现在我想要包含http的iframe,那么如何才能从https创建一个只有http的页面。

时间:2016-08-19 07:16:28

标签: php wordpress .htaccess http 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中使用不安全的网站

1 个答案:

答案 0 :(得分:0)

  • 您无法在https网页中包含http iframe

"但如果iframe是https然后重定向到http怎么办?"

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

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