thinkphp set ban Baidu search engine transcoding (simple practical) _php example

Source: Internet
Author: User

The web site on the mobile side of the reading will inevitably encounter transcoding problems, as a domestic search engine boss Baidu, the natural to do the leader of the technology, do Baidu transcoding, some sites after transcoding to achieve the desired results, but some web site after processing is not to be looked at Baidu, a lot of content appeared disorder, Joe's website also appeared some dislocation, so Joe used the WordPress plug-in mobilepress, after some Chinese modification, feeling more than Baidu's transcoding more suitable for their own.

Method 1, an explicit declaration in HTTP response, Cache-control:no-transform.

Add ' Http_cache_control ' => ' private,no-transform ' to the config.php file,//page cache control

Method 2, the META tag explicitly declares Cache-control as No-tranform, in the form:

 

The above mentioned is a small set of thinkphp to introduce a ban on Baidu and other search engine transcoding (simple and practical) related content, I hope to help you.

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.