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.

Some Accounts Not Generating 404 For Pages That Don't Exist

Discussion in 'General Discussion' started by ambition13, Jul 13, 2006.

  1. ambition13

    ambition13 Active Member

    Joined:
    Jan 24, 2006
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    Some of the accounts on my server you can just make up a file such as http://www.domainname.com/madeupfile.html and it will show the home page instead of a 404 error.

    For other accounts, most of which came from another cpanel box that I copied over, the correct 404 is shown.

    I imagine this is a setting somewhere that I have been unable to locate. Does anyone know how to set all of the accounts to show 404s for pages that don't truly exist?

    Thanks in advance.
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Check if there is any rules specified in the .htaccess file under public_html directory for domains in question.
     
  3. nickp666

    nickp666 Well-Known Member

    Joined:
    Jan 28, 2005
    Messages:
    770
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    /dev/null
    or it may be that your 404 page is actually re-directing people back to the home page.
     
  4. ambition13

    ambition13 Active Member

    Joined:
    Jan 24, 2006
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    I have checked the .htaccess files and made sure they aren't doing anything weird.

    Let me clarify from above that they are not redirecting 301 or 302 to the home page, but that www.domain.com/madeupfile.html actually is it's own url however the content is the same as the home page.

    Any other suggestions?
     
  5. mctDarren

    mctDarren Well-Known Member

    Joined:
    Jan 6, 2004
    Messages:
    664
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    New Jersey
    cPanel Access Level:
    Root Administrator
    Look in your httpd.conf, perhaps there is an ErrorDocument 404 statement in there?
     
  6. ambition13

    ambition13 Active Member

    Joined:
    Jan 24, 2006
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    In my httpd.conf, the ErrorDocument 404 statement is commented out.

    # 2) local redirects
    #ErrorDocument 404 /missing.html
    # to redirect to local URL /missing.html
    #ErrorDocument 404 /cgi-bin/missing_handler.pl

    I think that is the proper setup. Should those be commented out?

    Again, some of the accounts on my server do serve the correct 404 error pages when a page that doesn't exist is requested. There are just a couple that serve the same document as the home page with the non-existing url.

    I have looked through the cpanel account options, the httpd.conf, and the .htaccess files on each site and can't find anything weird.
     
Loading...

Share This Page