我现在正在使用wordpress。今天我发现我的xmlrpc.php文件被启用了。现在,我要禁用它。但我在下面所做的并不起作用
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>实际上,并不是所有的*.php文件都使用这种方式工作。但是,如果文件不是以.php结尾,它就可以工作
<Files "test.txt">
Order Deny,Allow
Deny from all
</Files>这是我的.htaccess文件,我也尝试用httpd.conf编写它,同样的结果
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<Files xmlrpc.php>
Order Deny,Allow
Deny from all
</Files>
<Files "php_test.php">
Order Deny,Allow
Deny from all
</Files>
<Files "test.txt">
Order Deny,Allow
Deny from all
</Files>test.txt
当我在我的服务器中访问test.txt时,我得到了这个。但是php_test.php我拍到了这张照片
php_test.php
我试过很多方法来解决这个问题,现在我需要帮助,谢谢你们
发布于 2016-05-18 20:35:33
我有替代的解决方案放在网站相关的插件下面的代码。
add_filter('xmlrpc_enabled', '__return_false');发布于 2016-05-19 20:21:53
@Parth Chavda
ProxyPass /xmlrpc.php !将上面的代码放在<Virtual Host *80>标记中的下面的代码之前
ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:10000/yjdata/www/wordpress/$1试着访问http://www.yourdomin.com/xmlrpc.php,你会得到这个!
Forbidden
You don't have permission to access /xmlrpc.php on this server这个问题从Parth Chavda获得fixed.Thanks的帮助。
https://stackoverflow.com/questions/37299171
复制相似问题