Due to the antics of some douchebag (IP address 184.108.40.206) I’ve had to look into blocking pages based on IP address with .htaccess files. This may come in handy to others out there so I figured I’d write up my findings.
To block everyone except specific IPs here’s what you’ll need (more info):
order deny,allow deny from all allow from <ip address>
To apply this restriction only to specific files, wrap the above code in the <File> tag:
<Files wp-login.php> order deny,allow deny from all allow from <ip address> </Files>
Thanks to user NuclearMeltdown on the #httpd channel on Freenode for his assistance.