Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts

    .htaccess advanced password protection

    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/admin1.php?p=home
    /admin/admin1.php?p=edit
    /admin/admin1.php?stuff
    admin 2's files
    /admin/admin2.php?p=home
    /admin/admin2.php?p=edit
    /admin/admin2.php?stuff
    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...
    Why not thank me?

    http://adamsworld.name

  • #2
    Senior Coder
    Join Date
    Oct 2003
    Location
    Australia
    Posts
    1,963
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

    I take no responsibility for the above nonsense.


    Left Justified

  • #3
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    well wouldnt it be something simple like
    <FILE file1.php,file2.php,file3.php>
    auth stuff
    </FILE>
    I tried this but it didnt work...
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •