gpt4 book ai didi

asp.net - 如何将 HTTPS IP 重定向到域

转载 作者:行者123 更新时间:2023-12-02 21:26:36 25 4
gpt4 key购买 nike

我有一个托管在 IIS 8.5 上的 asp.net 网站,我使用以下规则将所有流量重定向到 HTTPS:

<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{SERVER_PORT_SECURE}" pattern="^0$" />
</conditions>
<action type="Redirect" url="https://example.com{REQUEST_URI}" redirectType="Temporary" />
</rule>

当用户使用 https://192.168.0.3 访问网站时,此功能不起作用

Your connection is not private
Attackers might be trying to steal your information from 192.168.0.3 (for example, passwords, messages, or credit cards). Learn more
NET::ERR_CERT_COMMON_NAME_INVALID

安装的 SSL 是针对域 example.com 的,并且请求似乎未到达 IIS,因此我无法对其进行任何控制......?我无法控制用户来强制他们使用域 URL。

如何将 https://example.com 重定向到 https://example.com

最佳答案

尝试使用 SSL 保护本地 IP url 总会以证书错误 AFAIK 告终

阅读本文以了解更多信息:https://security.stackexchange.com/questions/103524/lets-encrypt-for-intranet-websites

编辑:我对IIS了解不多,但在这件事上发现了这个,可能会帮助你解决这个问题:https://blogs.msdn.microsoft.com/robert_mcmurray/2013/11/15/how-to-trust-the-iis-express-self-signed-certificate/

关于asp.net - 如何将 HTTPS IP 重定向到域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54919405/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com