Results 1 to 3 of 3

Thread: how do you make a custom 404 error page

  1. #1
    Join Date
    Oct 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how do you make a custom 404 error page

    How do you make one?
    you know, like what yahoo and google had, that if you type in "Google.com/*insert anything*" it has a custom 404 error page...literally, anything and it will come up with the custom page, so I want to know how to make one

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    There should be a directory on your webserver with error pages in. In Apache/*n*x the default is /var/www/error/. In this directory there are a number of error pages. Just edit the one you want.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    A more common way is just to create or edit your .htaccess file, by adding the below:

    ErrorDocument 404 http://www.mysite.com/error.htm

    This way, any page not found errors redirects the user to the above URL. For more info on .htaccess, see: http://www.javascriptkit.com/howto/htaccess.shtml

Bookmarks

Posting Permissions

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