基于HTTPS的IIS URL重写

时间:2019-02-28 06:40:47

标签: iis https url-redirection

2008 R2 + IIS7.5 + URL重写2.0

是否无法基于https重写操作?

<rewrite>
   <rules>
      <rule name="HTTP to HTTPS Redirect" enabled="true" stopProcessing="true">
            <match url="(.*)" />
            <conditions logicalGrouping="MatchAny">
                <add input="{HTTPS}" pattern="^off$" />
            </conditions>
            <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
      </rule>
      <rule>
            <rule name="W:Main PC" enabled="true" stopProcessing="true">
                <match url="^$" ignoreCase="true" />
                <action type="Rewrite" url="main/?target=config" appendQueryString="true" />
            </rule>
      </rule>
    </rules>
</rewrite>

“ W:Main PC”不适用于重写。正在重定向。

和302对象移动了重定向循环

ERR_TOO_MANY_REDIRECTS

我该如何解决?

0 个答案:

没有答案