【问题标题】:IIS 8.5 URL Rewrite with web service exceptions带有 Web 服务异常的 IIS 8.5 URL 重写
【发布时间】:2016-07-30 01:43:29
【问题描述】:

我在 URL 重写中设置了 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 调用上获得重定向。

【问题讨论】:

    标签: url-rewriting iis-8.5


    【解决方案1】:

    解决办法原来是缺少属性....

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-28
      • 2016-01-09
      • 2014-03-01
      • 1970-01-01
      相关资源
      最近更新 更多