View Full Version : .htaccess advanced password protection

10-15-2005, 11:22 PM
I know how to do .htaccess password protection. But is there a way I could have a different user for, say 3 files? I have an admin directory on my site. I have about 4 admins. They each have about 3 admin pages that do various things to their section of the site. I was wondering if there would be a way that when they entered their username and password in it took them to their "home page".
what im thinking:
/admin dir
admin 1's files
admin 2's files
and so on in that way...
You know how once you log into a dir with .htaccess you dont have to log in again till u leave and come back? well I want that for their 3 pages only. If they try to go to someone elses admin files the .htaccess password box pops up again.
got all that? seems simple...

10-15-2005, 11:36 PM
Sounds a bit 'hacky' for my liking...
Is there a reason you can't (or don't want to) use php/DB based authentification?
If the userID was a $_SESSION var all your other requirements would be trivial; as would adding or removing more admins (or changing what pages each admin is reponsible for).

just a thought :)

10-15-2005, 11:56 PM
well wouldnt it be something simple like
<FILE file1.php,file2.php,file3.php>
auth stuff
I tried this but it didnt work...