最近把博客程序换成了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 hourCacheClockRate 3600RepeatLimit 32# Protect httpd.ini and httpd.parse.errors files# from accessing through HTTP# Rules to ensure that normal content gets throughRewriteRule /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.phpRewriteRule ^/$ /index.php [L]RewriteRule /(.*) /index.php/$1 [L]
主页访问正常,其他页面出现404 not found是什么情况?我之前删除过.htaccess 文件,就出这个问题了
谢谢,我今天也出现了同样的错误,感谢你的共享,让我解决了这个问题!
谢谢你!我的问题与你的问题一样,正愁着呢,看到了你的博文,用了你的办法,果然好使了,解决了我的一大难题啊!我的网站快要开张了,有时间交流!
A good article Thank you!
wonderful share, great article, very usefull for me…thanks
Pingback: 解决黑莓Wordpress找不到Xmlrpc的问题 - YESURE技术博客
Pingback: [教程]解决黑莓Wordpress找不到xmlrpc的问题 | Tao's opinion
Pingback: 如何解决 WordPress下xmlrpc.php被屏蔽的问题
xmlrpc.php的问题你可以检查一下是否是服务器端屏蔽了rpc内容,但如果index.html也无法访问的话,肯定就是你的重写链接文件有问题了