How to block access to xmlrpc.php file?

I use this code in httpd.conf to block access to xmlrpc.php file that kills many wordpress based websites every day ;-)
<FilesMatch "^(xmlrpc\.php|wp-trackback\.php)">
Order Deny,Allow
Deny from all
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


New Member
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):

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