Ban IP’s


On my site, I am using the Live person, so whoever comes to my, I gets his complete information, its IP also, but, I do want to ban some of the IP’s, as I am getting some troubles from there, can I do that, and how to do.

Most of the Internet users, now have a dynamic IP address, so this is not always the best way to limit usage.
You can block an IP address by typing the following in the .htaccess file:

deny from 000.000.000.000

where 000.000.000.000 is the IP address.

If you only specify 1 or 2 of the groups of numbers, you will block a whole range.

You can allow an IP address by using:

allow from 000.000.000.000

where 000.000.000.000 is the IP address.
If you only specify 1 or 2 of the groups of numbers, you will allow a whole range.

If you want to deny everyone from accessing a directory, you can use:

deny from all

but this will still allow scripts to use the files in the directory.