iframe混合内容警告没有混合内容

时间:2016-03-08 18:36:25

标签: javascript iframe https mixed-content

也许我只是在这里失去理智,但我不断收到针对此页面的混合内容警告:

<!doctype html>
<html lang="en-us">
        <head>
            <link rel="stylesheet" type="text/css" href="css/style.css">
        </head>

        <body>
           <iframe scrolling="no" id="slides" src="admin/slides.html"></iframe>
           <iframe scrolling="no" id="sidebar" src="/sidebar"></iframe>
           <iframe scrolling="no" id="ticker" src="/clock2"></iframe>
        </body>
    </html>

这让我很困惑,因为一切都在同一个域上,并且所有页面都通过https提供。为了增加混淆,第一个iframe实际上没有警告,第二个iframe没有。此外,当您直接访问它们时,后两页可以正常使用https。它们甚至不存在于http - 我的.htaccess重定向到https。所有资源都通过https加载。我甚至尝试在src中使用带有https前缀的fqdn而不是相对引用,但它没有帮助。

我错过了什么?

1 个答案:

答案 0 :(得分:1)

我不太确定它为什么会发生,但从/ sidebar到/sidebar /(index.html)的重定向正在通过HTTP。我非常确定用/sidebar/index.html或只是/ sidebar /替换链接可以解决您的问题。

我刚测试过,这里是链接/侧边栏/和/ clock2 /加载到https的屏幕截图。 http://puu.sh/nzsnu/b421dfb4bd.png