ECSHOP Optimization ECSHOP Error Steering address change _php Tutorial

Source: Internet
Author: User
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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.