discuz x3.4 opening polymerization of tags and labels pseudo-static configuration

  Because of the need of SEO, do tags aggregated into a page, so that pseudo-static.

 E.g:

misc.php?mod=tag >>> /tag/  

misc.php?mod=tag&id=47 >>> /tag/47.html

 

 First, add pseudo-static rules, I was apache server, apache add this rule

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

  Then modify the template file

Open the template / default (template style) /forum/viewthread_node_body.htm, look for:? Misc.php mod = tag & id = var $ [0]

Replace: tag / $ var [0] .html

 

Open the template / default / tag / tagitem.htm, look for:? Misc.php mod = tag is replaced with: / tag /  

The document continues to look for: misc.php mod = tag & id = $ id is replaced with:? Tag / $ id.html

So OK, demonstration effect: http://bbs.yuanzhumuban.cc/tag/

  

 

Guess you like

Origin www.cnblogs.com/68xi/p/11403546.html