Asp.net 将http重定向到https asp/iis

Asp.net 将http重定向到https asp/iis,asp.net,iis-7,Asp.net,Iis 7,下面是我的web.config文件。我想要自动重定向http url到https。我试过下列方法,但不起作用。 在SSL设置中检查需要SSL的IIS7。 谁能帮忙吗。 谢谢 取消选中“需要SSL”-要使重定向生效,必须首先接受HTTP上的初始请求 编辑 第二点。您正在选择基于HTTPS的输入。您需要像这样否定条件: <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input=

下面是我的web.config文件。我想要自动重定向http url到https。我试过下列方法,但不起作用。 在SSL设置中检查需要SSL的IIS7。 谁能帮忙吗。 谢谢


取消选中“需要SSL”-要使重定向生效,必须首先接受HTTP上的初始请求

编辑

第二点。您正在选择基于HTTPS的输入。您需要像这样否定条件:

<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
    <add input="{HTTPS}" pattern="off" negate="true" />
</conditions>

IIS7中是否有任何设置不允许重写规则工作??
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
    <add input="{HTTPS}" pattern="off" negate="true" />
</conditions>