Results 1 to 3 of 3

Thread: .htaccess Logout

  1. #1
    Join Date
    Sep 2004
    Sri Lanka

    Question .htaccess Logout


    I am working with a .htaccess protected folder and looking for a way to include a logout link.

    I searched over the web, but many people say it is impossible. Some say to use invalid URL to logout link, but that wont work with IE.

    Whatever it is, you see we use .htaccess to logging cPanel, after login there is a logout link https://domain.com:2083/logout/ , theres https and port 2083. Is that a clue for a solution.

    If anyone of you know a PHP based solution for this, please let me know.

    Thanks and Best Regards

  2. #2
    Join Date
    Jul 2007
    You can indeed do this in PHP, but it wouldn't be using htaccess for the HTTP auth. Instead PHP would take care of all of it.

    You can find sample code here ...


  3. #3
    Join Date
    Jun 2003

    How do I log out?

    Since browsers first started implementing basic authentication, website administrators have wanted to know how to let the user log out. Since the browser caches the username and password with the authentication realm, as described earlier in this tutorial, this is not a function of the server configuration, but is a question of getting the browser to forget the credential information, so that the next time the resource is requested, the username and password must be supplied again. There are numerous situations in which this is desirable, such as when using a browser in a public location, and not wishing to leave the browser logged in, so that the next person can get into your bank account.

    However, although this is perhaps the most frequently asked question about basic authentication, thus far none of the major browser manufacturers have seen this as being a desirable feature to put into their products.

    Consequently, the answer to this question is, you can't. Sorry.
    Although PHPMyAdmin mimic's this pretty well:
    If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting...
    The same applies to HTML and the forums [HTML][/HTML] tags.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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