Customized error message

design

#1

i wanted to make a customized error message for a password protected directory on my site. i followed the instructions here: https://panel.dreamhost.com/kbase/index.cgi?area=961 .

when i tested it twice. when i put in the wrong username and password the login prompt just kept showing up. i tried this three or four times.

the second test was to cancel the login (which the page says should also generate an error page). when i cancelled it the login popup disappeared and i stayed on the page i was on. no error page showed up.

any ideas? the error message is called failed_auth.html and is located in my main site directory. should i put it in the directory that is specifically password protected?

thanks.

yrstruly.


#2

It’s supposed to work that way. The dialoge is like this:

  1. Browser: I want page X.
    Site: You didn’t provide valid credentials.
  2. Browser: I want page X and here are the credentials Y.
    Site: You didn’t provide valid credentials.
  3. Browser: I want page X and here are the credentials Y.
    Site: You didn’t provide valid credentials.
  4. Browser: I want page X and here are the credentials Y.
    Site: You didn’t provide valid credentials.
  5. Browser: I want page X and here are the credentials Z.
    Site: Here is page X.

See according to the server, #1 is no different than #2, #3 and #4. So the browser is getting the same response from the server each time.

Now this is interesting. What is supposed to happen is when you “cancel” the Browser doesn’t try to request the page again and it shows you the last response from the server, which should be the ErrorDocument for status code 401.

What browser are you using?

:cool: Perl / MySQL / HTML+CSS


#3

so, what you’re saying is that a person can just try different usernames and passwords for an unlimited amount of times? is there anyway to change that to cap it off at like 5 or something?

i’m using safari 2.0 on an imac g5 with os 10.4.2.

should i try it in another browser? did it work for you?