Php – .htaccess – list URL’s to be restricted by ActiveDirectory LDAP Groups


Currently I have a .htaccess file within the directory of the folder I want to restrict, with the appropriate group that has access to it.

What I want to do is have one htaccess for the entire site, and restrict groups to specific URL's.

So I want staff to have access to:


and Students to have access to:


I would prefer restricting by URL in the htaccess file, so I do not have to do it in the virtual host conf file, and restart service each time.

Best Solution

so i am guessing that your picking up the group from LDAP .. so as ur using PHP .. i am guessing u would have a top level include file for db connections etc. So u can pick up their group from the LDAP,store in session and in the include .. check that REQUEST_URI always goes to their relevant folder e.g /$_SESSION[group]/ .. if not redirect them there.

Related Question