Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default 404 Page not found

    Redeveloped my site from front page to Zen Cart.
    Noticed in my Access Logs alot of hits from old site.
    In current webmaster 404 Not found, I redirected to /page_not_found.php
    Now google search engine give me an error:
    Verification status: NOT VERIFIED
    Last attempt May 8, 2007: We've detected that your 404 (file not found) error page returns a status of 200 (Success) in the header.

    In page_not_found.php it reads
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: index.php?main_page=page_not_found");

    Google says:
    To ensure that no one can take advantage of this configuration to view statistics to sites they don't own, we only verify sites that return a status of 404 in the header of 404 pages.

    What do I need to make the change???
    Mark
    Hare Do

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: 404 Page not found

    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  3. #3
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: 404 Page not found

    Kim,
    thank you for the url on the same issue, but it did not fix my problem.
    They were refering to an earlier version of Zen Cart not 1.3.7
    1.3.7 starting on line 117 reads
    if (!is_dir(DIR_WS_MODULES . 'pages/' . $_GET['main_page'])) {
    if (MISSING_PAGE_CHECK == 'On' || MISSING_PAGE_CHECK == 'true') {
    $_GET['main_page'] = 'index';
    } elseif (MISSING_PAGE_CHECK == 'Page Not Found') {
    header('HTTP/1.1 404 Not Found');
    $_GET['main_page'] = 'page_not_found';

    I inserted the following below, but did not work,
    I believe the code already reads this issue

    Around line 105 of includes/init_includes/init_santitize.php, find
    if (!is_dir(DIR_WS_MODULES . 'pages/' . $_GET['main_page'])) {

    add this line below it:
    header('HTTP/1.1 404 Not Found');

    Any suggustions?
    Mark
    Hare Do

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 404 Page not found

    Aha ... it was working fine in the case of a not-found-zen-cart-page, but not in the case of a not-found "other" page (outside of ZC).

    To fix:
    /includes/modules/pages/page_not_found/header_php.php

    find this:
    Code:
    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_START_PAGE_NOT_FOUND');
    add this below it:
    Code:
    // tell the browser that this page is showing as a result of a 404 error:
    header('HTTP/1.1 404 Not Found');
    This will be included in v1.3.8
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: 404 Page not found

    Thank you Dr. Bytes,
    At first when the problem occured I edited the following file in my root directory
    page_not_found.php

    I found:
    header("HTTP/1.1 301 Moved Permanently");
    header("Location: index.php?main_page=page_not_found");

    Replaced with:
    header("HTTP/1.0 404 Not Found");

    Went to google and verified and she verified.

    So, I applied your changes and uninstalled my changes above to the orginial

    Quote Originally Posted by DrByte View Post
    Aha ... it was working fine in the case of a not-found-zen-cart-page, but not in the case of a not-found "other" page (outside of ZC).

    To fix:
    /includes/modules/pages/page_not_found/header_php.php

    find this:
    Code:
    // This should be first line of the script:
    $zco_notifier->notify('NOTIFY_HEADER_START_PAGE_NOT_FOUND');
    add this below it:
    Code:
    // tell the browser that this page is showing as a result of a 404 error:
    header('HTTP/1.1 404 Not Found');
    I will see in time by google for the fix.

    Thanks again,
    Mark
    Hare Do

  6. #6
    Join Date
    Feb 2007
    Posts
    107
    Plugin Contributions
    0

    Default Re: 404 Page not found

    I had the exact same problem with my site. For anyone else who may find this thread in researching the same issue, Dr. Byte's suggestion (above) fixed it for me with no other changes applied.

 

 

Similar Threads

  1. v139g Page Not Found 404
    By irishshopper in forum Basic Configuration
    Replies: 1
    Last Post: 22 May 2012, 01:41 PM
  2. Custm 404 Page Not Found?
    By milli in forum Basic Configuration
    Replies: 0
    Last Post: 26 Apr 2011, 05:19 AM
  3. custom 404 page not found
    By abs007 in forum Basic Configuration
    Replies: 3
    Last Post: 19 Mar 2009, 05:26 PM
  4. Help!! - 404 page not found
    By ieguana in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 29 Mar 2008, 06:27 PM
  5. 404 Not Found Page Not Found not working!
    By NamSingh in forum Basic Configuration
    Replies: 0
    Last Post: 15 Oct 2006, 10:31 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR