.htaccess question

Discussion in 'OT Technology' started by JoeyJoJoJuniorShabadoo, Apr 5, 2006.

  1. JoeyJoJoJuniorShabadoo

    JoeyJoJoJuniorShabadoo Live Free or Die

    Joined:
    Nov 9, 2004
    Messages:
    4,347
    Likes Received:
    0
    Location:
    http://www.stogietime.com
    I have my .htaccess and .htpasswd files set up and they do password protect one of my web folders.

    What I would like to do is that I would like to have it redirect someome to a different page if they get the username or password wrong.

    Is there anycode that would go into the .htaccess file to make this happen?
     
  2. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    Code:
    ErrorDocument 403 /path/to/403.html
    You can specify any Error Document in this fashion. 403 is "Forbidden" and is used when they fail to authenticate.
     
  3. JoeyJoJoJuniorShabadoo

    JoeyJoJoJuniorShabadoo Live Free or Die

    Joined:
    Nov 9, 2004
    Messages:
    4,347
    Likes Received:
    0
    Location:
    http://www.stogietime.com
    thanks, got that to work.

    now another question,

    is there anyway to limit how many times you can try to get the username and password correct? Right now it lets you try three times, but I only want it to let you try once.
     
  4. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    yea, just leave it on 3.
     
  5. JoeyJoJoJuniorShabadoo

    JoeyJoJoJuniorShabadoo Live Free or Die

    Joined:
    Nov 9, 2004
    Messages:
    4,347
    Likes Received:
    0
    Location:
    http://www.stogietime.com
    its actually just for me and a co-worker, What I want to happen is that if they enter the wrong password on the first try, then it routes them to another website that opens up another password box.
     

Share This Page