The original Ecshop, in some products can not find or be deleted, or directly to the dynamic page access, when the parameter is missing or the database can not find matching data, the program processing is pointing to the home page, this is not conducive to optimization, some pages need to modify the program, such as: goods.php
Access without parameters or error parameters, such as http://www.xxx.com/goods.php is turned to the home page, the test HTTP status is 302, this is not conducive to optimization.
if ($goods = = = False)
{
/ * Jump back to the homepage if no record is found * /
Ecs_header ("Location:./\n");
exit;
} now change to
if ($goods = = = False)
{
/ * Jump back to the homepage if no record is found * /
ecs_header (' http/1.1 404 Not Found ');
Ecs_header ("status:404 not Found");
header ("refresh:5;url=http://www.ledaokj.com");
print (' Something went wrong! This page does not exist, will return to the first page ...
Five seconds after the automatic jump ~ ~ ~ ');
exit;
the same needs to be modified, article.php,category.php,goods.php, etc.
This article is reproduced from Shenzhen Lock Network Technology (www.ledaokj.com) detailed text reference:ECSHOP Optimization ECSHOP Error Steering Address change
http://www.bkjia.com/PHPjc/764245.html www.bkjia.com true http://www.bkjia.com/PHPjc/764245.html techarticle The original Ecshop, in some products can not find or be deleted, or directly to the dynamic page access, when the parameter is missing or the database can not find matching data, the program processing ...