繁体   English   中英

允许使用apache HTACCESS在https页面上使用http iframe

[英]allow http iframe on a https page with apache HTACCESS

我对HTACCESS有问题

我有一个带有SSL证书的网页,例如https:// www。 example.com

然后,我必须在网络上注入其他公司的iframe。 iframe不是https,只是http,而其他公司则不会更改。

因此,我必须允许在htaccess上使用此iframe。

我将此iframe放在了不能是http的页面上

例如,如果我的整个网站是https:// www。 example.com我想转https:// www。 example.com/en/potato到http:// www。 example.com/en/potato,以便我可以注入http iframe。

我试着做

RewriteCond %{HTTPS} off
RewriteCond %{THE_REQUEST}  !^/en/potato$ [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
RewriteEngine on

RewriteCond %{HTTPS} on
RewriteCond %{THE_REQUEST} ^/en/potato$ [NC]
RewriteRule ^(.*)$ http://xxx.example.com/en/potato [R=301,L]

有什么建议吗?

网络也是在php上制作的

谢谢!

您不能在https网页中使用http iframe。 如果您包含一个重定向到http的https网页,它也会被阻止。

您可以执行哪些操作尝试通过https服务器代理iframe的内容,或者很好地要求http网页的所有者向其网站添加https。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM