jcadima
3/1/2015 - 7:14 PM

htaccess deny access with IP

htaccess deny access with IP

#deny access from files in the directory from everybody:

<Limit GET POST PUT>
     order deny, all
     deny from all
</Limit

# deny access to everybody but myself
<Limit GET POST PUT>
     order deny, all
     deny from all
     allow from 127.0.0.1
     # use allow from IP  for any other IPs
     # use $_SERVER['SERVER_ADDR'];  in php to output your IP
</Limit