访问wordpress站点xmlrpc.php出现404 Not Found错误的解决思路

最近把博客程序换成了wordpress,对PHP不了解,取消固定链接中的index.php就花了一天时间,然后发现wordpress for android,下载来一运行,提示404 Not Found的错误,可我已经按照网上教程启用了xml-rpc,并确定在根目录下有xmlrpc.php文件,Google后发现我这问题似乎很少人遇到,别人都是在使用Live writer之类软件的时候提示wordpress的xmlrpc文件出错(比如编码、权限问、以及服务器对xmlrpc文件的屏蔽问题),而不是404问题。

Google两天无果而终后重新检查自己的配置,发现站点中的index.html居然也无法访问,难道是url rewriter的问题?检查httpd.ini文件,果然!我的httpd.ini文件是网上google来的,这个文件帮忙解决了index.php的问题,但同时也“屏蔽”了不少非wp自身的文件以及xmlrpc.php这类文件,最后只需稍作修改便可恢复正常了。修改后的httpd.ini如下:

[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 /images/(.*) /images/$1 [L]
RewriteRule /cert/(.*) /cert/$1 [L]
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
RewriteRule /xmlrpc.php /xmlrpc.php [L]
RewriteRule /sitemap_baidu.xml /sitemap_baidu.xml [L]
RewriteRule /index.html /index.html [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]
相关日志

9 thoughts on “访问wordpress站点xmlrpc.php出现404 Not Found错误的解决思路

  1. Pingback: 解决黑莓Wordpress找不到Xmlrpc的问题 - YESURE技术博客

  2. Pingback: [教程]解决黑莓Wordpress找不到xmlrpc的问题 | Tao's opinion

  3. Pingback: 如何解决 WordPress下xmlrpc.php被屏蔽的问题

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>