解决连接XML-RPC server返回403

tag

前两天发现使用了 Zoundry Raven不能连接到http://example.com/xmlrpc.php ,以为是Zoundry Raven出了问题,重新安装了一次,依然有问题。又用google docs链接,收到 http 403消息。修改chmod值也没有变化,后来才知道服务器采用的是最小权限原则(Principle of least privilege)

功夫不负有心人啊,终于在这篇文章找到了解决办法

最后我编辑drupal根目录下.htaccess文件,增加:

<FilesMatch "^(index|xmlrpc).php$">
Order deny,allow
</FilesMatch>

记事:

正常情况下直接在浏览器中访问http://example.com/xmlrpc.php会得到这样的消息:

XML-RPC server accepts POST requests only.

403会返回这样的消息:

Forbidden

You don't have permission to access /xmlrpc.php on this server.