我在网址重写中设置了HTTPS重定向。一切正常但我需要为不包含在SSL中的Web服务排除一些服务器端口。
<rewrite>
<rules>
<rule name="HTTPS Redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{SERVER_PORT}" pattern="1010" />
<add input="{SERVER_PORT}" pattern="1212" />
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" />
</rule>
</rules>
</rewrite>
当我添加服务器端口异常时,Web服务正常工作,但我没有在http调用上获得重定向。