Blocking IP Address


#1

I’m trying to block an IP address that seems to be connecting to my site, registering and then posting gibberish dozens of times per day.
I create a file called “.htaccess” that contains the following lines (and nothing else):

order allow,deny
deny from 91.224.160.3
allow from all

However, every time I try to copy the file into my directories on the host, it vanishes. I am at a loss.

Any ideas? Thanks in advance.


#2

Your FTP client may be set to not show hidden files. I am sure it’s there but if you want to see it you will need to change that particular setting.


#3

Cool. Thanks for the info!


#4

I have a related question. I prepared a .htaccess file (without the .txt extension) on notepad with the following lines and uploaded it to the main folder in my domain

order allow,deny
deny from 88.71.226.100
allow from all

But the IP address above is still able to access my domain. I tried entering my own IP address to the list as well, but that didn’t block me either. Any suggestions? Thanks.


#5

“Order allow,deny” means that Apache looks at the “Allow all” first, allowing it to override the “Deny from 88.71.226.100”. Use “Order deny,allow” to block specific addresses.


#6

Makes sense. I’ll give it a try. Thanks.


#7

I changed the .htaccess file to read

order deny,allow
deny from 88.71.226.100
allow from all

but the IP in question is still accessing my domain. Any ideas?

Thanks.