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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts

    Custom error pages

    Hi!

    I have seen that it's possible to make your own error pages, but how exactly do you do??

  • #2
    Regular Coder
    Join Date
    Jul 2007
    Posts
    571
    Thanks
    25
    Thanked 28 Times in 28 Posts
    my host has an option where u can set the error page. Look around your control panel and see if u find anything.

  • #3
    Senior Coder JamieR's Avatar
    Join Date
    Oct 2004
    Location
    United Kingdom
    Posts
    3,161
    Thanks
    0
    Thanked 5 Times in 5 Posts
    If your host is running Apache and you have .htaccess access, use this tutorial:

    http://www.javascriptkit.com/howto/htaccess2.shtml

    Create an error page for 404 (document not found), 403 (access denied) etc etc, and then reference them in .htaccess.

    The page I've referenced has all you need.

    If you have cPanel then I think there is a section on setting custom error pages in there.

  • Users who have thanked JamieR for this post:

    CaptainB (10-14-2007)

  • #4
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    Weazel, just what I looked for!

  • #5
    Regular Coder
    Join Date
    Jun 2007
    Posts
    805
    Thanks
    123
    Thanked 23 Times in 23 Posts
    One problem:

    First, this is what I have written in my .htaccess file (there's something more, but I don't know what it is - it was there when I bought the hosting):

    ErrorDocument 404 /errors/pagenotfound.html

    The error page works if I ie write www.behrentzs.com/1
    But if I specify a filename, ex .php, (www.behrentzs.com/1.php), I just get the normal error page.

    How come, and how can I correct it??


  •  

    Posting Permissions

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