Posts Tagged ‘.htaccess’

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

Friday, March 19th, 2010

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.