【问题标题】:https Request for CSS file gives 502 Bad Gatewayhttps 请求 CSS 文件给出 502 Bad Gateway
【发布时间】:2013-09-05 15:05:16
【问题描述】:

最近,我不得不通过安装 SSL 将我的一些网站页面添加到安全页面。当我调用安全网页https://www.myDomain.com/test/httpstest.aspx 时,我的问题就出现了

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="https://www.myDomain.com/test/Style/Secure/en/BodyStyle.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    Test Https
    </div>
    </form>
</body>
</html>

此时调用页面时,CSS 会给出以下响应

注意测试文件夹上的 SSL 设置在 IIS 7 中设置为接受

我怎样才能解决这个问题并正常获取通过 https 调用的 CSS 文件?

【问题讨论】:

    标签: asp.net css ssl iis-7 https


    【解决方案1】:

    尝试调用你的CSS

    <link href="./test/Style/Secure/en/BodyStyle.css" rel="stylesheet" />
    

    当您使用 https 时,它会将其绑定到您的整个域名。 如果希望您的 css3 对其他公众隐藏,当您通过 html 导入时这是不可能的。浏览器需要这个文件来正确渲染你的 html 设计。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-07-20
      • 2018-04-23
      • 2019-05-25
      • 2013-08-04
      • 2014-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多