.htaccess – limit access by ip (or range of ips)

Using a .htaccess file it is not hard to limit access to a directory to only certain ips.

order deny,allow
deny from all
allow from 10.8.0
allow from 81.257.140.212

Using only a partial ip (like 10.8.0) means a wildcard so all of the 10.8.0.0/24 rage is allowed.

One thought on “.htaccess – limit access by ip (or range of ips)

  1. “.htaccess – limit access by ip (or range of ips) ? Jontas” was in fact
    a great blog post, can’t wait to go through even more of ur blogs.

    Time to waste several time on the net haha. Thanks a lot ,Cassandra

Comments are closed.