我在我的web.config中创建了一个重定向规则,将我的网站从http重定向到https。我遇到的问题是,网站上的每个链接都是https。我有很多链接到其他网站没有SSL,因此我得到证书错误。这是我所做的:ASP.NET Core重定向http到https
<rewrite>
<rules>
<rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAny">
<add input="{SERVER_PORT_SECURE}" pattern="^0$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
我该如何重定向https只为我的域名,而不是我的网站上的每个链接?
https://finalcodingtutorials.blogspot.ae/2017/03/non-www-to-www-with-http-to-https .html –
看看这里:https://neelbhatt.com/2018/02/04/enforce-ssl-and-use-hsts-in-net-core2-0-net-core-security-part-i/ – Neel