I'm looking for someone who knows .htaccess.
I'm running Apache on Win98 and would like to use .htaccess for user authorization. I have 2 questions:
Assuming I have the following directory structure
c:\phproot\
.htpass (created by .htpasswd)
user1_dir\
.htaccess
user2_dir\
.htaccess
There are 2 different .htaccess files defined for each user's realm. Each of
them point to the same .htpass file, which has user/password information for each user.
1) How do I use "require" in each .htaccess file to only allow user1 to be able to access user1_dir, and user2 to be able to only use user2_dir? Or do I just have to create 2 different .htpass files (rather than one with user1's and user2's info).
2) Can I specify a timeout for .htaccess? When I use .htaccess, once I log in with username and password, it never requires me to do it again, even if I go to the root page (outside the restricted directory). Is there a way to say, "after 5 minutes, if the user exits the restricted area, he must pass authorization again before accessing the restricted area again"?
Any insight would be much appreciated!