Results 1 to 4 of 4

Thread: Custom 404 Page

  1. #1
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Question Custom 404 Page

    Hi,

    I am running cPanel 11 with apache.

    I want a custom 404 page in php format. Currently its set to 404.shtml by default, even if I change the file name from 404.shtml to 404.php (under cPanel's "Custom Error Pages"), it still redirects to 404.shtml. So I was wondering if there is an alternate trick to do this?


    Please guide



    Thanx

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    I believe you could use htaccess for this. Simply create a file called .htaccess and place this in the file:

    Code:
    ErrorDocument 404 /path/to/404.php
    Simply edit the highlighted part to point to your 404.php page.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. The Following User Says Thank You to thetestingsite For This Useful Post:

    cancer10 (03-16-2008)

  4. #3
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Default

    That solved my problem.



    Thanx

  5. #4
    Join Date
    Dec 2007
    Posts
    123
    Thanks
    17
    Thanked 1 Time in 1 Post

    Default

    ok there is now a small glitch.

    If I place www in the URL, it works fine on Firefox and Opera but does NOT work in IE. IE says the page does not exist.

    http://www.resumehype.com/saurav


    With IE I need to remove the www to view the page

    http://resumehype.com/saurav



    Any solution for this?


    Thanx

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
  •