Disable Xmlrpc.php

how to disable xmlrpc.php i have tried adding
adding codes in (code pasted here is not appearing correctly)
in .htaccess but i can still access it
i want to block it since my website went down and in the log i saw so many attacks.

Block all XML-RPC requests

< Files xmlrpc.php >
< IfModule mod_authz_core.c >
Require all denied
< /IfModule >
< IfModule !mod_authz_core.c >
Order allow,deny
Deny from all
< /IfModule >
< /Files >

(ignore the spaces between < > else the code wasn’t appearing)