: This article mainly introduces ThinkPHP's simple and practical setting of prohibiting Baidu and other search engines from transcoding. For more information about PHP tutorials, see. 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.
The above introduces ThinkPHP settings to prohibit Baidu and other search engine transcoding is simple and practical, including some content, hope to be helpful to friends interested in PHP tutorials.