97久久国产亚洲精品超碰热,成人又色又爽的免费网站,色偷偷女人的天堂a,男女高潮喷水在线观看,国内精品一线二线三线区别在哪里
Discuz! 官方交流社區(qū)
標(biāo)題:
discuz X3.4 TAG標(biāo)簽偽靜態(tài)方法
[打印本頁(yè)]
作者:
zengrenrui
時(shí)間:
2019-7-15 10:54
標(biāo)題:
discuz X3.4 TAG標(biāo)簽偽靜態(tài)方法
要養(yǎng)成原文件備份的好習(xí)慣。
演示地址:
https://bbs.jatxh.cn/tag.html
1. 修改帖子內(nèi)tag標(biāo)簽鏈接,使其偽靜態(tài)。
打開(kāi)template/default(模板風(fēng)格)/forum/viewthread_node_body.htm,查找:
<a title="$var[1]" href="misc.php?mod=tag&id=$var[0]" target="_blank">$var[1]</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
替換為
<a title="$var[1]" href="tag-$var[0].html" target="_blank">$var[1]</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
2. 修改tag頁(yè),使各個(gè)標(biāo)簽鏈接偽靜態(tài)。
打開(kāi)
template/default/tag/tag.htm,查找
<a href="misc.php?mod=tag&id=$tag[tagid]" title="$tag[tagname]" target="_blank" class="xi2">$tag[tagname]</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
替換為
<a href="tag-$tag[tagid].html" title="$tag[tagname]" target="_blank" class="xi2">$tag[tagname]</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
3. 修改tag列表頁(yè)當(dāng)前位置,使其路徑鏈接偽靜態(tài)。
打開(kāi)template/default/tag/tagitem.htm,查找
<a href="misc.php?mod=tag">{lang tag}</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
替換為
<a href="tag.html">{lang tag}</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
再查找
<a href="misc.php?mod=tag&id=$id">$tagname</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
替換為
<a href="tag-$id.html">$tagname</a>
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
4. 讓搜索引擎蜘蛛可爬。
修改根目錄下robort.txt,刪除
Disallow: /misc.php
Disallow: /*?mod=misc*
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
修改根目錄下misc.php文件,注釋或刪除
$discuz->reject_robot();
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
5. 添加偽靜態(tài)規(guī)則。
linux系統(tǒng)(.htaccess或httpd.conf)偽靜態(tài)規(guī)則:
RewriteCond %{QUERY_STRING} ^(.*)$
RewriteRule ^tag-(.+)\.html$ misc.php?mod=tag&id=$1
RewriteCond %{QUERY_STRING} ^(.*)
RewriteRule ^tag\.html$ misc.php?mod=tag
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
WIN的添加(httpd.ini)偽靜態(tài)規(guī)則:(未測(cè),是否可用未知)
RewriteRule ^(.*)/tag-(.+)\.html*$ $1/misc.php\?mod=tag&id=$2
RewriteRule ^(.*)/tag\.html*$ $1/misc.php\?mod=tag
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
要保證規(guī)則文件內(nèi)最后一條偽靜態(tài)規(guī)則為
RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ plugin.php?id=$1:$2&%1
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
或者
RewriteRule ^(.*)/([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html(\?(.*))*$ $1/plugin\.php\?id=$2:$3&$5
[color=rgb(51, 51, 51) !important]
復(fù)制代碼
否則顯示插件不存在或已關(guān)閉。
原文地址:
https://bbs.jatxh.cn/thread-73980-1-1.html
作者:
zengrenrui
時(shí)間:
2019-7-15 10:55
怎么復(fù)制過(guò)來(lái)亂碼呢!
作者:
q813289
時(shí)間:
2019-7-17 08:19
作者:
q813289
時(shí)間:
2019-7-17 08:19
www.cpj123.com
作者:
金黑網(wǎng)絡(luò)
時(shí)間:
2023-1-26 15:44
discuz!X3.4 TAG標(biāo)簽偽靜態(tài)方法教程
https://www.jinhei.com/thread-426-1-1.html
已收藏,感謝分享。
作者:
TaC
時(shí)間:
2024-4-3 19:38
不錯(cuò),3.5測(cè)試成功
歡迎光臨 Discuz! 官方交流社區(qū) (http://r615.cn/)
Powered by Discuz! X5.0