| 1. |
How To Ban Certain Ip Addresses From Accessing Your Site Using .htaccess? |
|
Answer» Whatever the reasons are, sometimes you may want to ban certain IP ADDRESSES from accessing your website(s). This can easily be achieved by adding the following lines to your . htaccess file (replace IP with the IP address you want to ban from accessing your site, f.ex. 123.33.64.1):
Of course, you can specify more than one IP addresses and also C or B class IPS – this way you would ban all IPs from the ENTIRE class. F.ex. deny from 125.30.5. would ban all the IPs that start with 125.30.5. (125.30.5.1, 125.30.5.2, etc …). Add one IP PER line in your .htaccess file like this:
Whatever the reasons are, sometimes you may want to ban certain IP addresses from accessing your website(s). This can easily be achieved by adding the following lines to your . htaccess file (replace IP with the IP address you want to ban from accessing your site, f.ex. 123.33.64.1): Of course, you can specify more than one IP addresses and also C or B class IPs – this way you would ban all IPs from the entire class. F.ex. deny from 125.30.5. would ban all the IPs that start with 125.30.5. (125.30.5.1, 125.30.5.2, etc …). Add one IP per line in your .htaccess file like this: |
|