problem:
WordPress 有一个功能叫固定链接(或永久链接),就是将 index.php?aaa=bbb&ccc=ddd 这样的链接改写成比较好记或容易被搜索引擎收录的形式。在有 apache_mod_rewrite 的支持下,wp 可以将链接彻底重写为 yourblog/xxx/yyy 这样的形式,而在没有 mod_rewrite 支持下,wp 会利用 PHP 自身的环境变量来模拟重写,生成地址为 yourblog/index.php/xxx/yyy 这样的形式。在 WP 2.0.1 版本中,如果您的 Blog 是后一种情况(即无 mod_rewrite 支持),则会出现问题,当您访问 yourblog/feed 时,会返回 yourblog/comments/feed 的结果。
solution:
修改wp-includes/classes.php :
将
$this->rules = array_merge($page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $category_rewrite, $author_rewrite, $date_rewrite, $post_rewrite);
改为:
$this->rules = $page_rewrite + $root_rewrite + $comments_rewrite + $search_rewrite + $category_rewrite + $author_rewrite + $date_rewrite + $post_rewrite;
