Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Mar 2003
    Location
    a cardboard box
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Customized Error Page?

    How do you make it so that you make a customized error page if the address the user entered does not exist?
    -Scke Xival
    http://www.codingforums.com/images/icons/icon15.gif Elite Piece of Crackers

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    New York, USA
    Posts
    175
    Thanks
    0
    Thanked 0 Times in 0 Posts
    first make your error page, then you just need to let the server know to use it. On apache you can do it in .htaccess with something like
    ErrorDocument 404 /errorpage.htm

    On IIS you enter the url in the settings for the web site configuration. I forget where exactly but I've done it before. Hope that helps.

  • #3
    New Coder
    Join Date
    Mar 2003
    Location
    a cardboard box
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hmmm

    how exactly do u set up a .htaccess ?
    -Scke Xival
    http://www.codingforums.com/images/icons/icon15.gif Elite Piece of Crackers

  • #4
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Here's a tutorial on .htaccess: http://www.javascriptkit.com/howto/htaccess.shtml

    Anyhow, this is a server side question, so moving thread...
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #5
    New Coder
    Join Date
    Jan 2003
    Location
    N. Yorks
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just use plain old Internet Explorer myself. When this displays an error page, it just loads a standard one called error.html from your hard drive. you can see where exactly by entering a wrong page and seeing where it is by the folders it displays instead. So the easy way to do it here is to make your page, rename it error.html and swap it for the original file.
    yeah

  • #6
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,266
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Yeah, but you can't go into other ppl's PC's and change their error page it has to be done the ways shown above (serverside, not clientside)

  • #7
    New Coder
    Join Date
    Jan 2003
    Location
    N. Yorks
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    Ah, I didnt realise it was from the server side, Sorry!

    But that's how I would do it anyway, not that I would spend my time actually doing it - I thought it sounded quite pointless and unnecessary!

    P.S. You could try to get your users to download the web page or just copy the code.... Eek! OK I'll Give up now!!
    yeah


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •