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.

Problem with Custom Error Pages

Discussion in 'General Discussion' started by xray, Aug 16, 2006.

  1. xray

    xray Member

    Joined:
    Apr 5, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Can some one please help.?

    C Panel allows for customizing the various error pages. Normally - (if there IS an error) - and if you DON'T customize these pages, a standard or default error message is sent to the offending browser.

    However, if you DO customize the error pages, one's customized error page is sent.

    PROBLEM:

    I customized my page, and didn't like the look of my page. To "return return to square one," I deleted the HTML I wrote, which emptied the rectangle provided to being empty - it default cndition. I thought the normal error messages would come back.

    NOW, if there is an error due to Bad Request - or whatever - all that comes up is a blank screen. How do I get C panel - or the server - back to the default condition (what ever THAT is) so that browsers will display an error message (IF there IS an error)?

    Please help.
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    The instructions for handling http errors will be within a .htaccess file in the document root of the relevant account.

    Take a look for entries along the lines of "ErrorDocument". If these are present and the files to which they relate don't exist, you'll most likely get a blank page as you describe.
     
  3. xray

    xray Member

    Joined:
    Apr 5, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Please clarify for me. You say:

    "The instructions for handling http errors will be within a .htaccess file in the document root of the relevant account."

    The DOCUMENT ROOT OF THE RELEVANT ACCOUNT sounds like something my HOST has access to - not me. No .htaccess file that _I_ have access to, has anything about ERRORS.

    If understand it correctly - it seems that if I design custom error pages, they over-write the default error instructions in the DOCUMENT ROOT, and the only way to go back to the default instructions is to reload my CPanel (please, no!), or manually put them back. Is that right?

    If I could get the default code, or HTML, I probably could also enter in the the custom error page boxes - which I have access to.

    What do you think? Any ideas?

    Thanks,

    Xray
     
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    This is definitely something to which you will have access.

    Your document root is the root of your website, which will most likely be in /home/yourusername/public_html

    Take a look in your public_html directory and post back the contents of the .htaccess file.
     
  5. xray

    xray Member

    Joined:
    Apr 5, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for your reply, and explanation.

    My .htaccess file is completely blank. (See picture) I guess if I could get the code that NORMALLY belongs there, I could get things working again.
     

    Attached Files:

  6. xray

    xray Member

    Joined:
    Apr 5, 2006
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Problem solved:

    I found the error code that belongs in .htaccess:

    ErrorDocument 400 /notfound.html
    ErrorDocument 401 /notfound.html
    ErrorDocument 403 /notfound.html
    ErrorDocument 404 /notfound.html
    ErrorDocument 500 /notfound.html

    Thank you WEBIGNITION for putting me on the right track re: error pages.!

    Next Question for C PANEL Documentation Authors:

    Why don't you say that if you write a custom error page it will erase the default entries? And maybe give these default entries for reference. Are there others?

    xray
     
Loading...

Share This Page