zblog的IIS7,IIS8伪静态脚本

文章转载来自:香港空间


z-blog的IIS伪静态脚本

zblog的IIS伪静态,应用于香港空间的windows空间上,web.config脚本如下

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
  <rewrite>
   <rules>
    <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>