Problem with custom ErrorDocument 401

Discussion in 'Apache' started by serialbox, Sep 25, 2008.

  1. #1
    I am trying to set up a custom 401 error doc and am having a problem with it.

    I have a password protected folder using .htaccess which works fine. If I type in the correct username and password it logs me in successfully.

    Ive added the following to the .htaccess file in my websites main folder:

    ErrorDocument 401 /401.html


    This is where my problem begins....

    if I type in the wrong credentials I am repeatedly prompted to enter username/pass and am NOT redirected to my custom 401 error page however if I hit the "cancel" button instead of typing in a username and password then i AM redirected to my custom 401 page.

    My question is: why when entering the wrong username and password am I being repeatedly prompted over and over again for a username/pass instead of being redirected? Only upon hitting "cancel" does it send me to the error page. Entering in the correct username/pass works and logs me in so I know the .htaccess/.htpasswd are working

    Any help would be appreciated.
     
    serialbox, Sep 25, 2008 IP
  2. nimhost

    nimhost Active Member

    Messages:
    235
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    that's normal :)
     
    nimhost, Sep 26, 2008 IP
  3. serialbox

    serialbox Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    lol I realized that later in the night while thinking about it. thx anyway :)
     
    serialbox, Sep 26, 2008 IP