DiscuzX3.1 tag (tag) catalog pseudo static modification tutorial (with rules)

Source: Internet
Author: User

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

Use discuz Forum webmaster know discuz Forum System does not support the pseudo static tag, online search discuz label pseudo static tutorial is what more, But most of the changes are being made to 2.5, today's cool rice forum webmaster to share a DiscuzX3.1 the latest version of the tag directory pseudo static, pseudo static and directory pseudo static which one good everyone can see "Baidu Search Engine Optimization Guide" v2.1.2, good nonsense not to say, the Masquerade tutorial begins.

First let's look at what the Discuz default tag tag page looks like:

Tags home: Http://www.xxxx.cn/misc.php?mod=tag

Label content page: http://www.xxxx.cn/misc.php?mod=tag&id=13

However, this tutorial changes the following address:

Tags home: http://www.xxxx.cn/tag/

Label content page: http://www.xxxx.cn/tag/13.html

The following changes begin, please remember to back up the need to modify the file, to form a good habit, we want to modify the Post article tag's address

Open \template\default (template directory) \forum\viewthread_node_body.htm

Find: $var [1]

To be replaced by: $var [1]

The label address under this post article changes, and then we modify the link to the label page label Link.

Open \template\default\tag\tag.htm

Find: $tag [tagname]

To be replaced by: $tag [tagname]

So the link to the label page is modified, next I will modify the label list page navigation links.

Open \template\default\tag\tagitem.htm

Find: {lang tag}

To be replaced by: {lang tag}

So all the pages of the links are modified well next we add pseudo static rules that currently support WIN2003 and Apache

The rules for Apache are:

Rewritecond%{query_string} ^ (. *) $

Rewriterule ^tag/(. +). html$ misc.php?mod=tag&id=$1

Rewritecond%{query_string} ^ (. *) $

Rewriterule ^tag/$ Misc.php?mod=tag

The rules for win2003iis6.0 are:

Rewriterule ^ (. *)/tag/(. +) \.html*$ $1/misc.php\?mod=tag&id=$2

Rewriterule ^ (. *)/tag/*$ $1/misc.php\?mod=tag

PS: The above rules must be added to the last one, that is

Rewriterule ^ (. *)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+) \.html (\? *)) *$ $1/plugin\.php\?id=$2:$3&$5

Above, otherwise will not succeed, this rule is a plug-in pseudo static rule even if your plug-in does not need pseudo static you have to get this rule into the pseudo static file and then put the rules of this tutorial on top of this rule, after getting to the rule you can check out the plugin pseudo static in the SEO pseudo static.

The tutorial is not finished here,

Discuz x3.1 By default, spiders are forbidden to crawl the label page, the solution is:

Delete or comment out the root directory of misc.php line 18th: $discuz->reject_robot (); This code then opens the robots.txt file to remove the two rules that forbid spiders to catch:

Disallow:/misc.php

Disallow:/*?mod=misc*

After modifying the above files to the background to update the cache can be, the original address of this tutorial: http://www.koomi.cn/thread-12816-1-1.html by the Changsha Cool Rice Forum original published to A5 reprint please attach link

Related Article

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.