This article mainly introduces ThinkPHP settings to prohibit Baidu and other search engine transcoding (simple and practical) related information. if you need it, you can refer to the website's reading on mobile terminals and may encounter transcoding problems, baidu, the boss of domestic search engines, is naturally the leader in technology. Baidu transcoding has been implemented, and some websites have achieved the desired results after transcoding, however, some websites have been processed by Baidu and cannot bear to look directly at them. many contents are in disorder, and Joe's website has some misoperations. so Joe used the Wordpress MobilePress plug-in and made some Chinese modifications, I feel more suitable for myself 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.