How to block access to xmlrpc.php file?

#1
Hello
I use this code in httpd.conf to block access to xmlrpc.php file that kills many wordpress based websites every day ;-)
Code:
<FilesMatch "^(xmlrpc\.php|wp-trackback\.php)">
Order Deny,Allow
Deny from all
</FilesMatch>
Is it possible to add a rewrite rule to block access to some files like xmlrpc.php?
If you use wordpress and security plugins please share your working codes that work.
Thanks a lot
 

zEitEr

New Member
#5
Here is another solution if rules need to be added directly into each virtualHost (in case you use templates for auto-generating virtualHost like DirectAdmin does):

Code:
rewrite  {
    enable                  1
    autoLoadHtaccess        1
    RewriteRule ^/(xmlrpc|wp-trackback)\.php - [F,L,NC]
  }
 

remics

New Member
#6
Here is another solution if rules need to be added directly into each virtualHost (in case you use templates for auto-generating virtualHost like DirectAdmin does):

Code:
rewrite  {
    enable                  1
    autoLoadHtaccess        1
    RewriteRule ^/(xmlrpc|wp-trackback)\.php - [F,L,NC]
  }
Interesting! Thanks.
Where I put this code?
 
Top