The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

question about "password protect directories"

Discussion in 'General Discussion' started by ljwhite, Sep 27, 2006.

  1. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    There is one function called "password protect directories" in cpanel. I wonder if i can use this function to set double/multi username/password for one folder. I.e, i want to use password to protect a.com/admin. I set up two pairs of username/password. One is user1/pass1, the other is user2/pass2. Now if i want to open a.com/admin, i should input both of above username/password. First time, i should input user1/pass1, after this, i should input user2/pass2. Is this possible? If i can not do it through cpanel, could i modify the .htaccess file to do this?
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    This feature merely adds the relevant details to a .htaccess and .htpasswd files i.e. it is a convenient interface for Apache's standard HTTP authentication.

    I don't believe that .htaccess/.htpasswd authentication can apply multiple usernames/passwords in the way you describe. You can certainly add more than one set of authentication details, however this would only mean that you could use one set or the other and not mean that you have to use both.

    You might be better off checking the Apache docs to be on the safe side.
     
  3. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    I see. Thanks!
     
Loading...

Share This Page