IIS7的wordpress伪静态设置


部分使用香港虚拟主机的用户在win空间下不懂得如何配置伪静态,win空间采用iis7+版本,通过web.config配置文件进行伪静态设置,而且php版本也是通过该文件进行配置。

您需要将php版本设置为5.4并且把下面的伪静态脚本写入web.config文件中,下面是rewrite代码

<rewrite>
      <rules>
                <rule name="Main Rule" stopProcessing="true">
                    <match url=".*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <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="wordpress" patternSyntax="Wildcard">
                    <match url="*" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
       </rules>
    </rewrite>

 

当然,老样子,这边已经为您制作好一份Php5.4设置和伪静态的wordpress4.5的伪静态文web.config文件了,您只需下载后,放到web目录内即可。

点击下载wordpress伪静态脚本

免实名域名注册