Limit access on login and IP in .htaccess

Posted by Rob on Server Fault See other posts from Server Fault or by Rob
Published on 2009-11-06T18:02:15Z Indexed on 2010/05/04 16:08 UTC
Read the original article Hit count: 154

Filed under:

There are many examples showing how to use .htaccess to restrict users by login or on their IP address (i.e they are ok from the ones given without authorisation). For some reason the following is never mentioned, yet it seems quite useful.

How do I restrict using groups and ip, e.g.

group1 can access the page from anywhere group2 can access the page only from certain IP addresses if you are not logged on, you cant see the page, regardless where you are

I would like to have all 3 of these working at the same time.

© Server Fault or respective owner

Related posts about .htaccess