我有一张网.指定配置重写规则以将所有流量移动到https.这个规则是有效的,但我不希望在调试时需要SSL.我有很多网站.释放配置转换已经在publish上完成了,所以我决定在其中加入一个重写规则.问题是,重写规则没有像其他设置那样进行转换.这里是网络.配置设置:
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules runAllManagedModulesForAllRequests="true"/>
<rewrite></rewrite>
</system.webServer>
这就是正在进行的转变:
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect HTTP to HTTPS" stopProcessing="true">
<match url="(.*)"/>
<conditions>
<add input="{HTTPS}" pattern="^OFF$"/>
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther"/>
</rule>
</rules>
</rewrite></system.webServer>
如果我把重写规则复制到网上.配置它工作正常.有人知道为什么要上网吗.释放配置转换不仅仅适用于这个部分?