为爱守候 发表于 7 天前

建站帮助:WordPress博客伪静态规则

因我们的服务器系统采用的IIS8.5版本,因此wordpress伪静态规则文件必须为web.config,规则内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="wordpress" patternSyntax="Wildcard">
<match url="*"/>
<conditions>
<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>
</system.webServer>
</configuration>
您可以新建一个记事本,将以上代码复制进去,然后保存为web.config,然后将web.config上传到wwwroot目录即可实现wordpress伪静态访问!
页: [1]
查看完整版本: 建站帮助:WordPress博客伪静态规则