香港空间,学生空间,游戏空间,视频空间,传奇空间,初学者空间,高防空间,全能空间,香港空间,免备案空间,不限流量空间,抗防空间,电影空间,下载站空间,成人空间,网站模板,asp,PHP,HTML,源码空间,无限制内容免备全能空间,免备案抗防空间,抗防免备案空间提供商,网站模板源码提供商,cy0575,cy0575.cn!

您的当前位置:网站首页 » 本站公告 » 正文

IIS7的wordpress伪静态设置

来源:本站 发表:2018-2-7 点击:680

部分使用香港虚拟主机的用户在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>