IIS 8.5重写/重定向

时间:2018-07-12 07:18:59

标签: iis

    <rule name="www.xyz.com.au" stopProcessing="false">
    <match url=".*" />
        <conditions>
         <add input="{HTTP_HOST}" pattern="^xyz.com.au$" />
        </conditions>
        <action type="Rewrite" url="www.xyz.com.au" />
    </rule>

    <rule name="support.xyz.com.au" stopProcessing="false">
    <match url=".*" />
        <conditions>
          <add input="{HTTP_HOST}" pattern="^support.xyz.com.au$" />
          <add input="{PATH_INFO}" pattern="^/support/" negate="true" />
        </conditions>
        <action type="Rewrite" url="\support\{R:0}" />
    </rule>

    <rule name="help.xyz.com.au" stopProcessing="false">
    <match url=".*" />
        <conditions>
          <add input="{HTTP_HOST}" pattern="^help.xyz.com.au$" />
          <add input="{PATH_INFO}" pattern="^/help/" negate="true" />
        </conditions>
        <action type="Rewrite" url="\help\{R:0}" />
    </rule>

  <rule name="HTTP/S to HTTPS Redirect" enabled="true" stopProcessing="true">
    <match url="(.*)" />
       <conditions logicalGrouping="MatchAny">
       <add input="{SERVER_PORT_SECURE}" pattern="^0$" />
       </conditions>
    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" />
  </rule>

我必须重写xyz.com.au,使其变成www.xyz.com.au,然后将http更改为https。

除了第一个“ www.xyz.com.au” 以外,上述作品

xyz.com.au变为https://xyz.com.au。 怎么了?

0 个答案:

没有答案