How to block certain IP's from my site ?
Introduction
You complete this operation thanks to the .htaccess file.
This applies to text files that are detected by the web server (Apache). These files define the rules for a directory and its sub-directories.
Procedure to follow
You must create an .htaccess file and place it in the
www directory (or in a directory particular you wish to limit).
This file should contain the blocking rules. Each rule is defined in the following format:
Deny from address_IP
Or Deny from page_IP
Or Deny from domain
All you have to do is replace the generic term with the unit you wish to block. Here are some examples:
You wish to block this IP 192.168.1.2, so you write:
Deny from 192.168.1.2
You wish to block all the IPs from 192.168.x.x, so you write:
Deny from 192.168
You wish to block all the IPs that have a Wanadoo identification, just write:
Deny from .wanadoo.fr