.htaccess Logout

Discussion in 'HTML' started by Matthieu Ebert, Jan 2, 2006.

  1. Hi ,

    how can I , as a Site User (Visitor) when i loged in with .htaccess logout
    myself again without closing my browser. Do you know any solutions in PHP ,
    send a Header or something.

    Cheers
    Matt.
     
    Matthieu Ebert, Jan 2, 2006
    #1
    1. Advertisements

  2. Matthieu Ebert

    Rob McAninch Guest

    Matthieu Ebert>:
    Is this a site you want to give users the ability to logout from, or
    do you want to logout from someone else's site?

    You can't control someone else's site, so just close your browser.
    Or perhaps your browser has an option to forget authentication
    information.

    If this is your site you want the feature for. Try
    http://www.php.net/features.http-auth

    But you may be better off using a more robust login method than
    basic authentication. Typically these involve cookies with a session
    id that times out.
     
    Rob McAninch, Jan 2, 2006
    #2
    1. Advertisements

  3. No No ,

    i want that:

    when I am loged on a site, with acertain Login, I can Logout and logon with
    another username..WITHOUT closing the browser..

    Cheers
    Matt.
     
    Matthieu Ebert, Jan 2, 2006
    #3
  4. Matthieu Ebert

    Marc Guest

    Delete your cookies and go to the login page.

    Marc
     
    Marc, Jan 2, 2006
    #4
  5. Matthieu Ebert

    Rob McAninch Guest

    Marc>:
    Depends if cookies are what is being used. It's not always the case.
    Firefox 1.5 has an option to clear private data that may make it
    simpler than clearing cookies, and should clear authentication
    information as well.

    This is mostly dependent on your browser, and perhaps an upstream
    proxy server that could be misbehaving and caching data it shouldn't.
     
    Rob McAninch, Jan 3, 2006
    #5
  6. I guess with 'logged in with .htaccess', you mean HTTP authentication.

    There is usually no way to 'logout' except for closing the browser - the
    words 'login' and 'logout' are in fact wrong when talking about HTTP
    authentication, as HTTP is stateless and there is no user session to log
    into or out of.

    There is no way for a server tell a browser to forget the user credentials.
    At least for FireFox the webdeveloper extension provides a menu option to
    clear the user credentials, forcing the user to re-enter the credentials on
    the next access (which is the closest thing to 'being logged out' HTTP can
    offer).
     
    Benjamin Niemann, Jan 4, 2006
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.