ECSHOP optimization ecshop error redirection address change _ PHP Tutorial

Source: Internet
Author: User
ECSHOP optimization ecshop error redirection address change. In the original ECSHOP, when some products cannot be found or deleted, or access dynamic pages directly, when the parameters are lost or the database cannot find matching data, the program processes the original ECSHOP. when some products cannot be found or deleted, or access the dynamic page directly, when the parameters are lost or the database cannot find matching data, program processing points to the homepage, which is not conducive to optimization. you need to modify some page programs, such as goods. php


Access without parameters or error parameters, such as http://www.xxx.com/goods.php is switched to the home page, testing http status is 302, which is not conducive to optimization.


If ($ goods = false)
{
/* If no record is found, jump back to the home page */
Ecs_header ("Location:./\ n ");
Exit;
} Now change


If ($ goods = false)
{
/* If no record is found, jump back to the home page */
Ecs_header ('http/1.1 404 Not Found ');
Ecs_header ("status: 404 Not Found ");
Header ("refresh: 5; url = http://www.ledaokj.com ");
Print ('

Error! This page does not exist. The homepage will be returned soon...

Automatic jump in five seconds ~~~

');
Exit;
} Also, articles. php, category. php, and goods. php must be modified.


This article is reposted from Shenzhen LDO Network Technology (www.ledaokj.com) for details, refer to: ECSHOP optimization ecshop incorrect redirection address change

...

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.