Discuz prohibit the inclusion of a version of the post

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Various reasons, need to prohibit the SE to discuz a page of the collection of posts (such as water version, or for better SEO, etc.). Of course, if you set the permissions, do not allow to browse this page, it must not be included.

This method is needed when both visitors are asked to browse the posts and do not want to have the search engines included. Two years ago in the point of stone hair, but point stone repeatedly, now tourists do not have permission to browse, in order to need people can see, so send again.

1. Use robots.txt file, prohibit list

Disallow:/forum-1-

#数字即为要禁止版块的ID.

#注意数字最后的-do not omit, otherwise even the first version of the ID 11,12 1 is banned

2. Add meta robots tag, prohibit the inclusion of a forum post

Modify viewthread.php file in $oldtopics = Isset ($_dcookie[' oldtopics '))? $_dcookie[' Oldtopics ']: ' D '; Add:
if ($thread [' FID ']==1] {
$seohead. = ' <meta name= ' content= ' noindex,nofollow '/> ';
}
To determine which version ($thread [' FID ']) The post belongs to, add meta-robots to it.

Although the 1th block included, but it is possible from the dynamic form or other places to visit the post link, so also use the 2nd to add Meta to the post page. These two points in the section ID and want you to prohibit the plate corresponding, if there are multiple sections, the 1th add line on the line, the 2nd to modify the logical expression in the break statement.

Original: http://seo.banmutian.org/thread-47-1-1.html

Author: SEO Laborer Original: http://seo.banmutian.org/copyright, reprint please specify the author, source, original link and this statement

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.