Zen Cart Logo
Forums / Customization from the Admin / 404 Page not found

404 Page not found

Locked

Views: 5,150

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
8 May 2007, 9:09 PM
#1
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

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???

9 May 2007, 12:25 AM
#3
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

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?

9 May 2007, 4:27 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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:// This should be first line of the script: $zco_notifier->notify('NOTIFY_HEADER_START_PAGE_NOT_FOUND');add this below it:```
// tell the browser that this page is showing as a result of a 404 error:
header('HTTP/1.1 404 Not Found');

9 May 2007, 12:35 PM
#5
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,180
Plugin Contributions:
0

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

DrByte:

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:// This should be first line of the script: $zco_notifier->notify('NOTIFY_HEADER_START_PAGE_NOT_FOUND');add this below it:```
// 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,
29 May 2007, 7:37 PM
#6
grandmaj avatar

grandmaj

Zen Follower

Join Date:
Feb 2007
Posts:
104
Plugin Contributions:
0

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.