ThinkPHP settings prohibit Baidu and other search engine transcoding (simple and practical), thinkphp simple and practical _ PHP Tutorial

Source: Internet
Author: User
ThinkPHP settings prohibit Baidu and other search engine transcoding (simple and practical), thinkphp is simple and practical. ThinkPHP is set to prohibit Baidu and other search engines from transcoding (simple and practical). thinkphp simple and practical websites will inevitably encounter transcoding problems when reading on mobile terminals, as the boss of domestic search engines, ThinkPHP is set to prohibit Baidu and other search engines from transcoding (simple and practical). thinkphp is simple and practical.

Websites may encounter transcoding problems when reading data on mobile terminals. Baidu, the boss of domestic search engines, naturally becomes the technical leader and implements Baidu transcoding, some websites have achieved the desired results after transcoding, but some websites cannot bear to look directly after Baidu processing. many contents are disordered and Joe's website is also misplaced, as a result, Joe used the Wordpress lepress plug-in. after some Chinese modifications, I feel that it is more suitable for him than Baidu's transcoding.

Method 1: explicitly declare in HTTP Response, Cache-control: no-transform.

Add 'http _ CACHE_CONTROL '=> 'private, no-transform' to the config. php file, // control the webpage cache

Method 2: explicitly declare Cache-control as no-tranform in the meta tag. the format is:

 

The above section describes ThinkPHP settings to prohibit Baidu and other search engine transcoding (simple and practical). I hope this will help you.

Articles you may be interested in:
  • ThinkPHP method for retaining the search status by page
  • ThinkPHP implements an example of the ajax function similar to the search function on the official website
  • How to maintain conditional paging on the home page and search page during Thinkphp search

Parse (simple and practical), thinkphp simple and practical website reading on the mobile end will inevitably encounter transcoding problems, as the boss of domestic search engines...

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.