Hmm. I've used .htaccess but as a redirect, ie I'd put it on sites that host old versions of my site and redirect people to the new host - say, when the site was on geocities, in case anyone accessed the geocities address directly rather than the domain address.
I managed to mess things up once with .htaccess to the point nobody could view the host server which didn't make me very popular. I took a look at the .htaccess file on my index page but couldn't really understand what it was doing to be honest.
At the moment I just use a simple php script on the relevant page if I want to ban an IP address:Code:# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName [url]
AuthUserFile /home2/[username]/public_html/_vti_pvt/service.pwd
AuthGroupFile /home2/[username]/public_html/_vti_pvt/service.grp
<? if(strstr($_SERVER['REMOTE_ADDR'] ,"66.36.249.149")) { die("<font size=+2><b><center>Message to be displayed instead of page</font></b></center>"); }?>
Wildcard asterisks can take the place of part of the IP address, but the problem with any method is how do I go about banning whole countries?
