备注:
1、在你使用ISAPI_Rewrite后,无需再使用cos-html-cache静态生成插件,因为没有这个必要了。
2、ISAPI_Rewrite国外网址:http://www.basilv.com/psd/blog/2006/running-wordpress-20-under-iis
规则如下:
[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 /software-files/(.*) /software-files/$1 [L]
RewriteRule /images/(.*) /images/$1 [L]
RewriteRule /sitemap.xml /sitemap.xml [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]
方法2
在iis6/wordpress2.8.4下测试过,完美实现了伪静态并且没有中文tab的问题出现。
设置方法如下:
1.下载Mr.Sam为你提供的httpd.ini,将它放到空间根目录。下载:右键另存为
2.修改wp-includes\classes.php文件
找到:
//代码开始//
if ( isset($_SERVER['PATH_INFO']) )
$pathinfo = $_SERVER['PATH_INFO'];
else
$pathinfo = '';
$pathinfo_array = explode('?', $pathinfo);
$pathinfo = str_replace("%", "%25", $pathinfo_array[0]);
$req_uri = $_SERVER['REQUEST_URI'];
//代码开始//
if ( isset($_SERVER['PATH_INFO']) )
$pathinfo = mb_convert_encoding($_SERVER['PATH_INFO'],"UTF-8","GBK");
else
$pathinfo = '';
$pathinfo_array = explode('?', $pathinfo);
$pathinfo = str_replace("%", "%25", $pathinfo_array[0]);
$req_uri = mb_convert_encoding($_SERVER['REQUEST_URI'],"UTF-8","GBK");
$req_uri_array = explode('?', $req_uri);
$req_uri = $req_uri_array[0];
提供一份完整的第二种方法,httpd.ini+classes.php两个文件下载。目前适合于WordPress2.8X
httpd_classes.rar
Linux下通过.htaccess设置HTTP301转向,修改方法,把代码中51aspx.org.cn,www.51aspx.org.cn改成你的旧网址,将www.nideyu.cn替换成你的新网址即可
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^51aspx.org.cn [NC]
RewriteRule ^(.*)$ http://www.nideyu.cn/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.51aspx.org.cn [NC]
RewriteRule ^(.*)$ http://www.nideyu.cn/$1 [L,R=301]
