---
title: "Använder htpasswd. Kan man logga ut?"
type: "forum-thread"
url: "https://www.webforum.nu/amne/webbutveckling/172594-använder-htpasswd-kan-man-logga-ut"
topic: "Webbutveckling"
topic_url: "https://www.webforum.nu/amne/webbutveckling"
author: "Danne V"
published: "2008-07-02T21:08:49.000Z"
updated: "2008-07-03T05:17:27.000Z"
replies: 2
views: 404
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/webbutveckling/172594-använder-htpasswd-kan-man-logga-ut"
---

# Använder htpasswd. Kan man logga ut?

## #1 — Danne V, 2008-07-02T21:08Z

Använder \*nix, Free BSD och htpassword (via Cpanel) för att skydda några foldrar.

Dilemmat är att kakan och/eller sessionen är öppen ganska länge. Folk som använder samma dator efter mig har även dom access ganska länge. Vet nån hur man kan logga ut, eller korta ner sessionen?

Har förstås skickat in en support-ticket till hotellet, men postar här ändå ifall nån vet nåt knep...

Permalänk: https://www.webforum.nu/p/172594

## #2 — HiDensity, 2008-07-02T21:16Z

Hittade detta på the interwebs.. kanske värt att testa..

> One trick that works on most browsers I've tried it with is to make the person go to a part of th site for which they are not authorized.
> 
> For instance, make a directory "/logout" and make the .htaccess there use a different file of usernames and passwords. If your user goes there, they will get asked for a username/password, but when they try theirs, they will get denied. This makes the browser forget the password. Your auth denied page for this directory should be something like "You have been logged out".
> 
> It's pretty crude, and somewhat confusing, but there aren't many other alternatives. That's one reason not a lot of people use basic auth such as with .htaccess.

[Här hittade jag en guide med flera olika sätt](http://www.ssi-developer.net/htaccess/htaccess_logout.shtml) (y)

Permalänk: https://www.webforum.nu/p/2124123

## #3 — Danne V, 2008-07-03T05:17Z

Tack!

Permalänk: https://www.webforum.nu/p/2124137

---

Tråden på webben: https://www.webforum.nu/amne/webbutveckling/172594-använder-htpasswd-kan-man-logga-ut
