View Full Version : custom ip range in .htaccess

09-10-11, 14:21

Is there way that provide custom IP range in .htaccess to allow from? For an instance,

09-10-11, 14:34
Just allow the network as following:

allow from 10.0.0.

I am concerned that I am unaware of a more wordy method of allowing a specific range of IP's. Hope this helps.

09-10-11, 14:40
What exactly you wanting to do? Rather allow perticular IP's allowing IP range can cause security threats, you simply do not want to give access to anyone, sooner or later when you do not know who is using those IP's.

09-10-11, 14:53
If you want to block a IP range, you can use the following steps:

order allow, deny
deny from
allow from all.
This will deny access to anyone with the IP numbers through

So the same is true of the allow; simply change the texts from “allow” to “deny” and vice versa.

09-10-11, 15:08
Wouldn't it be simpler to use IPTables to do the same thing?

09-10-11, 15:17
OP specifically asked for a .htaccess file and yes, with the help Of IPTables we can do all this on a firewall, but a lot of people don't have the access to firewall systems and therefore they must resolve this issue with .htaccess information.

09-10-11, 15:24
Probably OP is on shared or reseller hosting package, because I haven't seen a VPS or Dedicated Server without IPTables access.