Search code examples
.htaccesshttp-authentication

How to logout of Auth basic authentication with htaccess?


I'm doing HTTP basic authentication via .htaccess, and I need to logout; is this possible?

Thanks.


Solution

  • Per the Wikipedia Basic access authentication page (in the Disadvantages section):

    there is no effective way for a server to "log out" the user without closing the browser.

    This is because the server doesn't keep track of who is logged in. Instead, the browser sends authentication credentials on every request to the server.