Forum Moderators: phranque

Message Too Old, No Replies

.htaccess Log off?

Is there a log off command for .htaccess set passwords?

         

ahmedtheking

7:59 pm on Jan 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a password protected folder which uses the .htaccess password thing (sorry, my forte isn't Apache!) but is there a PHP or HTML or any kind of command/link/something that could be used to log the user out, so to speak?

jdMorgan

11:19 pm on Jan 5, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



With Apache's basic authentication, the only way to "log off" is to close the browser. It is the browser that "remembers" the authentication state, so the user is "logged-in" until the browser is completely closed.

If your concern is that the user will get up and leave the machine while still logged-in, then you'll need to add some other server-controlled mechanism, such as a short-lived cookie, rather than leaving it up to the client-side browser.

Jim

ahmedtheking

1:58 am on Jan 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok thank you!