我在我的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