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 Page (404.shmtl)

Discussion in 'General Discussion' started by mbuttrey66, Aug 10, 2007.

  1. mbuttrey66

    mbuttrey66 Member

    Joined:
    Aug 10, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello...

    I was wondering if anyone could help me with this?

    I uploaded a Custom Error Page on my site about a year ago and thought that it was complete..

    I had been tracking hits through AWWW Stats and Google Adsense., and started noticing a big difference.

    AWStats was stating that there were about 4-5000 404 errors per month, and Google about 100.

    So after a little leg work I noticed that the Firefox Google 404 Error Page was coming up instead of my 404.shmtl page.

    "ERROR 404 - PAGE NOT FOUND
    Oops! Looks like the page you're looking for was moved or never existed.
    Make sure you typed the correct URL or followed a valid link.

    We recommend you load this web site using Firefox."

    When I type my direct 404 error page address it is fine http://www.massagelotion.net/404.shmtl

    But when there is a miss type or missing page, i.e... http://www.massagelotion.net/blahblah the Firefox Google Error page shows.


    I have gone through the custom error page to no avail...


    Any ideas?

    Thanks!

    Matt
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I get the same page on both links, your FF page. Creating an error page using cPanels tool is easy, and the file name ends with .shtml not shmtl

    Bit of a difference, if I go here. http://www.massagelotion.net/404.shtml
     
  3. mbuttrey66

    mbuttrey66 Member

    Joined:
    Aug 10, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    This is what I was talking about... 1st is Top Pages-Url Stats

    Page Hits
    /404.shtml 13 6.54 KB 7 7


    2nd is Error Codes

    HTTP Error codes* Hits Percent Bandwidth
    404 Document Not Found 3230 69.9 % 12.39 MB

    How come my Top Pages Url Stats is 13 and Error Codes "404" is 3230?

    I've tested all the error "missing" pages and I don't get Custom Error Page...still Google 404 Error page.

    http://www.majick-consulting.com/images/error_page_pic.jpghttp://www.majick-consulting.com/images/error_page_pic.jpg"]http://www.majick-consulting.com/images/error_page_pic.jpghttp://www.majick-consulting.com/images/error_page_pic.jpg[/URL]


    What gives?
     

    Attached Files:

  4. mbuttrey66

    mbuttrey66 Member

    Joined:
    Aug 10, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Still Problem With Custom Error Page

    Hello...

    I was wondering if anyone could help me with this?

    I uploaded a Custom Error Page on my site about a year ago and thought that it was complete..

    I had been tracking hits through AWWW Stats and Google Adsense., and started noticing a big difference.

    AWStats was stating that there were about 4-5000 404 errors per month, and Google about 100.

    So after a little leg work I noticed that the Firefox Google 404 Error Page was coming up instead of my 404.shmtl page.

    "ERROR 404 - PAGE NOT FOUND
    Oops! Looks like the page you're looking for was moved or never existed.
    Make sure you typed the correct URL or followed a valid link.

    We recommend you load this web site using Firefox."

    When I type my direct 404 error page address it is fine http://www.massagelotion.net/404.shtml

    But when there is a miss type or missing page, i.e... http://www.massagelotion.net/blahblah the Firefox Google Error page shows.


    I have gone through the custom error page to no avail...
    This is what I was talking about... 1st is Top Pages-Url Stats

    Page /404.shtml Hits 13 6.54 KB 7 7


    2nd is Error Codes

    HTTP Error codes* Hits Percent Bandwidth
    404 Document Not Found 3230 69.9 % 12.39 MB

    How come my Top Pages Url Stats is 13 and Error Codes "404" is 3230?

    I've tested all the error "missing" pages and I don't get Custom Error Page...still Google 404 Error page.

    http://www.majick-consulting.com/images/error_page_pic.jpg

    What gives?
     
    #4 mbuttrey66, Aug 14, 2007
    Last edited: Aug 14, 2007
  5. norelidd

    norelidd Well-Known Member

    Joined:
    Jan 15, 2007
    Messages:
    173
    Likes Received:
    1
    Trophy Points:
    18
    You're going to need to redefine the ErrorDocuments in your .htaccess

    Add some lines to your .htaccess file like so:

    ErrorDocument 404 /404.shtml
    ErrorDocument 403 /403.shtml

    and so on. You should be fine from then.
     
  6. mbuttrey66

    mbuttrey66 Member

    Joined:
    Aug 10, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Do I add the full line straight to the .htaccess?

    I.E...

    ErrorDocument 404 /404.shtml

    or...

    /404.shtml

    Thanks...

    .htaccess is a unknown area for me..
     
  7. mbuttrey66

    mbuttrey66 Member

    Joined:
    Aug 10, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    One more thing.

    Which .htaccess do I add it to?

    .htaccess 0 k 0644
    .htaccess.1143158276 0 k 0644
    .htaccess.1143166325 0 k 0644
    .htaccess.1146375946 0 k 0644
    .htaccess.1146385598 0 k 0644
    .htaccess.1146385606 0 k 0644
    .htaccess.1146388888

    Thanks again!

    Matt
     
  8. mbuttrey66

    mbuttrey66 Member

    Joined:
    Aug 10, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    And where? :confused:

    # -FrontPage-

    IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

    <Limit GET POST>
    order deny,allow
    deny from all
    allow from all
    </Limit>
    <Limit PUT DELETE>
    order deny,allow
    deny from all
    </Limit>
    AuthName www.massagelotion.net
    AuthUserFile /home/massagel/public_html/_vti_pvt/service.pwd
    AuthGroupFile /home/massagel/public_html/_vti_pvt/service.grp

    AddHandler application/x-httpd-php htm html
     
  9. mbuttrey66

    mbuttrey66 Member

    Joined:
    Aug 10, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Looks like I got it.

    Added ErrorDocument 404 /404.shtml straight the main .htaccess.

    Thanks for everything!
     
  10. norelidd

    norelidd Well-Known Member

    Joined:
    Jan 15, 2007
    Messages:
    173
    Likes Received:
    1
    Trophy Points:
    18
    Sorry for the delayed reply, but it looks like you got it. For future reference for other surfers, you would want to add it to the .htaccess file in the root public_html folder (not one of the other wacky-named ones). You would want to add that full line anywhere in the file, so long as it isn't within some other statements within brackets.

    There's a nice writeup here about Error codes and adding your own pages: http://support.hostgator.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=312
     
  11. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    If any of you that are having to modify .htaccess to get custom error pages working wouldn't mind, which version of cPanel are you using?
     
Loading...

Share This Page