WordPress教程:IIS7中wordpress伪静态web.config规则

1.后台设置你需要的“固定链接”- “常用设置”-“自定义结构”

/%category%/%post_id%.html

2.创建web.config文件,然后上传到网站根目录

<?xml version="1.0" encoding="UTF-8"?> 
<configuration>  <system.webServer> 
<rewrite> 
<rules><clear/> 
<rule name="chinese tag" stopProcessing="true"><match url="/tag/(.*)"/> 
<conditions logicalGrouping="MatchAll"/> 
<action type="Rewrite" url="/index\.php\?tag={R:1}"/> 
</rule> 
<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>

注:只有空间安装了IIS官方推出的URL Rewrite组件之后才有效.

完成以上两步即可


WordPressCorelDRAW教程