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.

Password Protected Dir Logout

Discussion in 'General Discussion' started by rhendrix9, Oct 8, 2005.

  1. rhendrix9

    rhendrix9 Member

    Joined:
    Aug 25, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Atlanta, GA
    Iam just starting out. I created a password directory, How do I implement a logout?
    Thanks
     
  2. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    Re you using .htaccess or another solution for protecting your directory(ies)?
     
  3. rhendrix9

    rhendrix9 Member

    Joined:
    Aug 25, 2004
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Atlanta, GA
    I used the "web protect" function from cpanel. I see an .htaccess file. I just started out, is there a better way?
    Thanks
     
  4. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    The web protect/.htaccess feature is quite secure.

    However, once a browser authenticates, that browser can visit any number of sites and return to the authenticated site without having to re-authenticate, so long as it has not been closed.

    So, a logout would require closing the browser.

    A snippet of javascript like the following could work for most visitors.

    Code:
    <form>
    <input type=button onClick='window.opener=self;window.close()' value='Logout'>
    </form> 
     
Loading...

Share This Page