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

Thread: Custom 404 Page

  1. #1
    Regular Coder
    Join Date
    Jun 2006
    Location
    UK
    Posts
    922
    Thanks
    302
    Thanked 3 Times in 3 Posts

    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
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Open up your .htaccess file (should be located in the public_html or www folder of your website.)
    Find this line: ErrorDocument 404 /404.shtml or something similar
    Edit it to: ErrorDocument 404 /404.php
    Save the file.

  • Users who have thanked Apostropartheid for this post:

    phantom007 (03-16-2008)

  • #3
    Regular Coder
    Join Date
    Jun 2006
    Location
    UK
    Posts
    922
    Thanks
    302
    Thanked 3 Times in 3 Posts
    That solved my problem.



    Thanx

  • #4
    Regular Coder
    Join Date
    Jun 2006
    Location
    UK
    Posts
    922
    Thanks
    302
    Thanked 3 Times in 3 Posts
    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
    Last edited by phantom007; 03-22-2008 at 07:00 AM.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Do you need to use the full url? Why not just /saurav ?
    ||||If you are getting paid to do a job, don't ask for help on 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
    •