如何使用htaccess的注销验证基本认证的?如何使用、基本、htaccess

2023-09-02 01:15:52 作者:眠医

我通过这样的.htaccess HTTP基本身份验证,我需要注销;这可能吗?

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

感谢。

推荐答案

每维基百科基本访问认证页面(在劣势部分):

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.