修复wordpress中feed页面404错误
刚发现抓虾对我的抓取一直没有更新,觉得非常奇怪。
自己点了一下才发现我的feed页面(http://anyff.com/feed)出现404错误:
The requested URL /feed/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
赶紧求助GOOGLE并先后尝试了一下方法:
1) 检查 wp-config.php,wp-rss2.php,wp-atom.php,functions.php文件看是否在程序外有空行,就是<?php…?>之外。可惜这个方法对我无效。
参考自:http://www.kachy.net/wordpress/462.html
2) 后来想起可能是我的.htaccess的问题。因为换了空间之后因为看似一切正常,尤其是我的伪静态都没有问题,所以我没有去检查过我的.htaccess,打开一看确实少了以前用的下面那段。
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
不管怎样我先加上再说了。然后feed页面就恢复正常了。
参考自:http://blog.linggan.com/dreamhost-wordpress-htaccess-404error.html
结果好一切好,呵呵。