<?xml version="1.0" encoding="UTF-8"?> 

<configuration> 

<system.webServer> 

<rewrite> 

<rules>

 

 <rule name="WWW Redirect" stopProcessing="true">

      <match url=".*" />

      <conditions>

       <add input="{HTTP_HOST}" pattern="^go345.cn$" />

      </conditions>

      <action type="Redirect" url="http://www.go345.cn/{R:0}" redirectType="Permanent" />

     </rule>此代码为二级域名跳转至www

 

<rule name="301" stopProcessing="true"> 

<match url="^(.*)$" ignoreCase="false" /> 

<conditions logicalGrouping="MatchAll"> 

<add input="{HTTP_FROM_HTTPS}" pattern="^on$" negate="true" /> 

</conditions> 

<action type="Redirect" url="https://www.go345.cn/{R:1}" redirectType="Permanent" /> 

</rule> 此代码为http跳转至https

<rule name="/ Z-BlogPHP Imported Rule" stopProcessing="true"> 

<match url="^.*?" ignoreCase="false" /> 

<conditions logicalGrouping="MatchAll"> 

<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 

<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 

</conditions> 

<action type="Rewrite" url="index.php/{R:0}" /> 

</rule> 

<rule name="/ Z-BlogPHP Imported Rule index.php" stopProcessing="true"> 

<match url="^index.php/.*?" ignoreCase="false" /> 

<conditions logicalGrouping="MatchAll"> 

<add input="{REQUEST_FILENAME}" matchType="IsFile" /> 

</conditions> 

<action type="Rewrite" url="index.php/{R:0}" /> 

</rule> 

</rules> 

</rewrite> 

</system.webServer> 

</configuration>