The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

404 Error Page

Discussion in 'General Discussion' started by bonnaroo, Jul 17, 2007.

  1. bonnaroo

    bonnaroo Registered

    Joined:
    Jul 17, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    From cPanel home I click Error Pages->404

    I enter the details of the page and I save as 404.php. Although the 404.php page is saved, it is not displayed when I visit a page that doesn't exist. When I return to edit the 404 page it has reverted back to .shtml ..

    Is there a way to make my default 404 page PHP? I could use a meta tag to refresh the page but I don't want search engines to consider my site junk.

    Thanks in advance.
     
  2. outlaw web

    outlaw web Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    well

    why not just use the redirect function???

    OWM
     
    #2 outlaw web, Jul 17, 2007
    Last edited: Jul 17, 2007
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    When I used to do ErrorPages on a cPanel/WHM server, I bypassed the nice GUI for it and went straight to the .htaccess file for more control. You can add your ErrorDocument directives there to point to your PHP file and ignore the .shtml files.

    Documentation for Apache 1.3's implementation of ErrorDocument:
    http://httpd.apache.org/docs/1.3/mod/core.html#errordocument

    Of course, you could always do a kludge and have .shtml files parsed by the PHP interpreter. I advise against this because of the potential for unnecessary server load.
     
Loading...

Share This Page