How do I redirect to another URL when "This webpage is not found" URL is displayed

Discussion in 'JavaScript' started by Jeff1113, Oct 2, 2010.

  1. #1
    I am using gatekeeper for simple security for a web page but if the user keys in the wrong password (which is the file name), they are directed to a URL that doesn't exist (because it's not the right file name). I would like to know if there is a way in javascript to redirect to another web page instead.

    The code for gatekeeper can be found at:
    http://www.htmliseasy.com/keeper/index.html
     
    Jeff1113, Oct 2, 2010 IP
  2. hdewantara

    hdewantara Well-Known Member

    Messages:
    540
    Likes Received:
    47
    Best Answers:
    25
    Trophy Points:
    155
    #2
    Perhaps using ajax to check file existence before form submission
    could be the solution.

    Hendra
     
    hdewantara, Oct 3, 2010 IP
  3. GFX_Lover

    GFX_Lover Peon

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Use htaccess to redirect :)
     
    GFX_Lover, Oct 3, 2010 IP