我想大家都知道,在WordPress 3.21之前的解决方法,互联网上1搜1大片,由于本人并没有从事过PHP编程,不是很了解,本虚拟空间提供商是美国的Ipage,Debian系统,Apache2.2,其中对于UrlPath中包含中文字符处理可能有问题,所以需要调整1下,我的方法是对于Tag和Category中包含中文字符的话,全部不进行UrlRewrite,依旧作为普通的Querystring传递,方法如下:
修改wp-includes/rewrite.php第1012行
function get_extra_permastruct($name) { if ( empty($this->permalink_structure) ) return false; if ( isset($this->extra_permastructs[$name]) ) return $this->extra_permastructs[$name][0]; return false; }
注意将
if ( empty($this->permalink_structure) )
修改为
if ( empty($this->permalink_structure) )