2016-04-08 24 views
0

我在URL重写中设置了HTTPS重定向。一切正常,但我需要排除一些不包含在SSL中的Web服务的服务器端口。IIS 8.5 URL使用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调用。

回答

0

溶液原来是丢失属性....

<add input="{SERVER_PORT}" pattern="1010" negate="true"\>