Pseudo-static support for special page of SHOPNC Mall

Source: Internet
Author: User

SHOPNC system default feature module is not pseudo-static, it really does not know why. But to make it support pseudo-static, it's easy to implement.

Open the SHOPNC Routing feature class file,/core/framework/core/route.php. Find the _shoppathinfo method. There is a regular substitution for the pseudo-static address that conforms to the rule, and we add an element to its $reg_match_from array:

'/^special_detail-(\d+) $/' ,

Similarly, add an element in the same position as the following $reg_match_to:

' special-special_detail-special_id-\\1 ' ,

In this way, the system will automatically recognize the format such as/special_detail-3.html address, and normal resolution to/shop/index.php?act=special&op=special_detail&special_ Id=3 this address.

Of course, if you need to modify the topic list so that the thematic links shown in the topic list become pseudo-static format, the/core/framework/function/core.php file needs to be modified. Find Getshopspecialurl This method, plus a pseudo-static switch to judge, as follows:

functionGetshopspecialurl($special _id){
if(Url_mode) {
returnShop_site_url.Ds.' special_detail-'.$special _id.'. html ';
}
returnShop_site_url.Ds.' index.php?act=special&op=special_detail&special_id= '.$special _id;
}

Now if the system turns on pseudo-static, the system will automatically display the pseudo-static address where the link to the feature Detail page is displayed.


Pseudo-static support for special page of SHOPNC Mall

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.