免费开源的ISAPI Rewrite Filter
2008年10月17日Ionics Isapi Rewrite Filter是一个免费且开源的ISAPI Rewrite Filter。也可用于wordpress。
对于让wordpress在IIS下使用永久链接的情况,可以配置isapirewrite4.ini如下:
RewriteLog c:\temp\iirfLog.out
RewriteLogLevel 0
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]但也同样遇到PHP要用FASTCGI模式运行才正常的问题,如果用ISAPI模式则总是返回到首页。
如果要用Super Cache可以用如下的配置文件:
# ChainedRewriteCond.ini
#
# shows how to chain RewriteCond statements
#
# remember to rename this file to IsapiRewrite4.ini ,
# or copy this content to a file named IsapiRewrite4.ini
# before using it!
#
#
# Fri, 11 May 2007 12:44
#
RewriteLog c:\temp\iirfLog.out
RewriteLogLevel 0
RewriteEngine On
RewriteBase /
#RewriteCond %{HTTP_HOST} ^blog.bluesky.cn$
#RewriteCond %{REQUEST_URI} !^.*[^/]$
#RewriteCond %{REQUEST_URI} !^.*//.*$
#RewriteCond %{REQUEST_METHOD} !=POST
#RewriteCond %{QUERY_STRING} !.*=.*
#RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond d:/docs/blog/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
#RewriteCond %{HTTP_HOST} ^blog.bluesky.cn$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]注:“%{DOCUMENT_ROOT}”好像不起作用,所以要写上真实的路径名。
[...] 免费开源的ISAPI Rewrite Filter [...]