Page 1 of 1

Htaccess rules to disable access to a directory based IP

Posted: Sat Dec 15, 2012 2:58 pm
by a24uall
Inside the directory that you want to restrict access based on Ip address create a .htaccess file
vi .htaccess
Add the below lines to the htaccess file
order deny,allow
deny from all
allow from YOUR_IP