我有一个域名,它的DNS设置指向VPS。
VPS有一个IIS10实例,它使用bootstrap使用html托管简单的网站。
我安装了一个SSL证书,并为https部分添加了绑定。
我能够浏览http和https上的域名。
我在web.config中添加了以下规则:
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="https://{HTTP_HOST}/{R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
然而,这似乎没有帮助。我仍然可以在http上浏览。
我尝试了以下几种方法:
- This shows the website in http without images but with text
- The website is properly displayed in https
这里我漏掉了什么?
https://stackoverflow.com/questions/50692114
复制相似问题