WordPress在IIS下利用Rewrite规则实现伪静态

WordPress在Linux下面实现伪静态只需要在后台设置连接就会自动生成一个.htaccess文件

但是在Windows环境下面就会复杂一点,下面就是介绍在IIS环境下利用ReWrite组件实现WordPress伪静态的方法

注意:
1、必须空间商启用了Rewrite模块
2、必须将httpd.ini上传到网站的根目录

使用方法:

把下面的内容保存为httpd.ini文件,上传到WordPress网站根目录即可

[ISAPI_Rewrite]
# Defend your computer from some worm attacks
#RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing through HTTP
# Rules to ensure that normal content gets through
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /software-files/(.*) /software-files/$1 [L]
RewriteRule /images/(.*) /images/$1 [L]
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /sitemap.xml.gz /sitemap.xml.gz [L]
RewriteRule /robots.txt /robots.txt [L]
RewriteRule /favicon.ico /favicon.ico [L]
# For file-based wordpress content (i.e. theme), admin, etc.
RewriteRule /wp-(.*) /wp-$1 [L]
# For normal wordpress content, via index.php
RewriteRule ^/$ /index.php [L]
RewriteRule /(.*) /index.php/$1 [L]
原文地址:
http://www.vcoo.me/show/1241.html

相关文章:
WordPress在Win下的ISAPI_ReWrite伪静态规则
http://blog.phui.cn/archives/192

WordPress的httpd.ini说明(设置伪静态)
http://yyld.net/316/

Related Posts