Search the Knowledgebase |
Browse by Category |
|
|
|
How do I block an IP from accessing my website? |
Article Details
Last Updated 9th of July, 2008
|
User Opinions (36 votes) |
27%
72%
|
Thank you for rating this answer.
|
You can block an IP address from accessing your website by editing a file named ".htaccess" in your main "www" directory. This file is simply a text file. You can add the following text to the file:
<Limit GET POST>
order allow,deny
allow from all
deny from 192.168.1.100
deny from 192.168.2.
</Limit>
The above settings would block the IP 192.168.1.100 and block anyone from the IP range 192.168.2.0 to 192.168.2.255.
You can add as many deny lines as needed to block different IP addresses.
NOTE: If you have Frontpage extensions installed, you do not want to edit the .htaccess file, as this can break the Frontpage extensions.
If you have any problems in setting this up, simply let us know the IP number you want blocked, and we can edit the .htaccess file directly and add the IP number.
|
Attachments |
No attachments were found.
|