[TriLUG] htaccess

Aaron S. Joyner aaron at joyner.ws
Thu Mar 24 19:25:41 EST 2005


Joseph Tate wrote:

>I love it when I can catch Aaron with something.  When connecting to a
>password protected area, the server returns a 401 Unauthorized, which
>is what causes the browser to pop up the username/password dialog.  If
>after X attempts it fails (I believe that's set on the web server), it
>will return a 403.  If you're doing this in PHP and send a 403, the
>browser will simply show the 403 error page.  You'll need to modify
>the response code to send a 401 in order to pop up that
>username/password dialog.  In my previous employment incarnation, I
>helped developed a system whereby you could authenticate either via
>basic auth type mechanisms, or through a web form.  All authentication
>was against the DB backend.
>
>  
>
Aw well, that'll teach me to more thoroughly double-check my facts than 
a quick google on "403 unauthorized", to make sure I had the number 
right.  :)  But in comes the beauty of a collaborative mailing list - as 
someone said just last week I believe, the fastest way to find the right 
answer, is to provide the wrong one.  :)

Aaron S. Joyner



More information about the TriLUG mailing list