Presently I've got a .htaccess file inside the directory from the folder I wish to restrict, using the appropriate group that can access it.

What I wish to do is have one htaccess for the whole site, and restrict groups to a particular URL's.

And So I want staff to get access to:


and Students to get access to:


I'd prefer restricting by URL within the htaccess file, and so i don't have to get it done within the virtual host conf file, and restart service every time.

and so i am speculating that the obtaining the audience from LDAP .. in order ur using PHP .. i'm speculating u might have a high level include apply for db connections etc. So u can select up their group in the LDAP,store in session as well as in the include .. make sure that REQUEST_URI always would go to their relevant folder e.g /$_SESSION[group]/ .. otherwise redirect them there.

With htaccess, AFAIK, you'd require a new htaccess for every of individuals folders. You can just create customers with similar not/pw for each one of the folders for ongoing access, however they will have to sign in more often than once.

Because you have this labeled under php, I can provide you with a much better php solution :) Simply prompt the consumer for not/pw and make up a session to create loggedin = 1 and you are all set. If you wish to get this to secure, you want to do it via db and can include some kind of md5 3 digit within the session too.