Forum Moderators: phranque
I know this has no doubt been covered many a time, but I cant find any threads on it.
I tried site search a couple of times, but dont really know what other terms to search for! :)
Can someone point me in the direction of a thread / site that explains how to ban a specifc IP address from accessing a site?
Cheers
Scott
Order Allow,Deny
Allow from all
Deny from 215.186.120.47
this will block 215.186.120.47. you can add even more deny lines or use regular expressions on it (enable regex with ~).
thread on deny and apache [webmasterworld.com]
you can also use the sitesearch with the term 'deny ip'.
In the .htaccess file, add
ErrorDocument 403 /your_custom_forbidden.html
The previously mentioned 'deny from ..' will cause the server to issue a 403 status code, which you direct to your custom document.
Note that your host may already have provided for this, in which case you only need to update their custom document.