-
儀器儀表科技公司類(lèi)網(wǎng)站...
-
中英雙語(yǔ)律師事務(wù)所類(lèi)網(wǎng)...
-
玩具動(dòng)漫類(lèi)網(wǎng)站織夢(mèng)模板...
-
手游APP軟件下載類(lèi)網(wǎng)站織...
-
電腦系統(tǒng)軟件下載類(lèi)網(wǎng)站...
-
財(cái)稅記賬工商注冊(cè)認(rèn)證類(lèi)...
-
網(wǎng)站模板資源下載類(lèi)網(wǎng)站...
-
展覽展會(huì)信息類(lèi)網(wǎng)站織夢(mèng)...
-
裝飾建材公司類(lèi)網(wǎng)站織夢(mèng)...
-
物流快運(yùn)速遞類(lèi)網(wǎng)站織夢(mèng)...
-
鋼結(jié)構(gòu)崗?fù)I(yíng)銷(xiāo)型織夢(mèng)網(wǎng)...
-
水利工程施工類(lèi)網(wǎng)站織夢(mèng)...
-
電子元件電路板類(lèi)網(wǎng)站織...
-
精工機(jī)械軸承生產(chǎn)廠(chǎng)家類(lèi)...
-
儀器分析儀類(lèi)網(wǎng)站織夢(mèng)模...
-
貂絨大衣服裝設(shè)計(jì)類(lèi)網(wǎng)站...
-
蔬菜鮮果配送類(lèi)網(wǎng)站織夢(mèng)...
-
人力資源管理類(lèi)網(wǎng)站織夢(mèng)...
-
營(yíng)銷(xiāo)型無(wú)縫鋼管定制生產(chǎn)...
-
食品百貨英文外貿(mào)類(lèi)網(wǎng)站...
無(wú)論你網(wǎng)站全站是靜態(tài)或者動(dòng)態(tài)還是偽靜態(tài),此教程都可以設(shè)置TAG標(biāo)簽頁(yè)為偽靜態(tài),并且是單鏈接id的形式
按此教程操作后,電腦站TAG標(biāo)簽url會(huì)像如下:
- TAG標(biāo)簽首頁(yè) http://www.j4240.cn/tags.html
- TAG標(biāo)簽列表 http://www.j4240.cn/tags/9.html
- TAG標(biāo)簽分頁(yè) http://www.j4240.cn/tags/9_2.html
按此教程操作后,手機(jī)站TAG標(biāo)簽url會(huì)像如下:
- TAG標(biāo)簽首頁(yè) http://m.91084.com/tags.html
- TAG標(biāo)簽列表 http://m.91084.com/tags/9.html
- TAG標(biāo)簽分頁(yè) http://m.91084.com/tags/9_2.html
電腦站TAG偽靜態(tài)實(shí)現(xiàn)教程
1、/tags.php 找到 18行
if(isset($tags[2])) $PageNo = intval($tags[2]);
在它下面加入
$tagid = intval($tag);if(!empty($tagid)){$row = $dsql->GetOne("SELECT tag FROM `dede_tagindex` WHERE id = {$tagid}");if(!is_array($row)){ShowMsg("系統(tǒng)無(wú)此標(biāo)簽,可能已經(jīng)移除!","-1");exit();}else{$tag = $row['tag'];define('DEDERETAG', 'Y');}}else{$tag = '';}
如圖

2、/include/taglib/tag.lib.php 找到 87行
$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";
改成
$row['link'] = $cfg_cmsurl."/tags/".$row['id'].".html";
3、/include/arc.taglist.class.php 找到 458行
$purl .= "?/".urlencode($this->Tag);
改成
if(!defined('DEDERETAG')){$purl .= "?/".urlencode($this->Tag);}
繼續(xù)找到
return $plist;
在它上面加入
if(defined('DEDERETAG')){$plist = preg_replace('/_(\d+).html/i','.html',$plist);$plist = preg_replace('/.html\/(\d+)\//i','_\\1.html',$plist);}
4、電腦站TAG標(biāo)簽偽靜態(tài)規(guī)則,根據(jù)自己網(wǎng)站的主機(jī)環(huán)境選擇下面的規(guī)則
.htaccess (Apache)
RewriteEngine OnRewriteBase /RewriteRule ^tags\.html$ tags\.phpRewriteRule ^tags/([0-9]+)\.html$ tags\.php\?\/$1 [L]RewriteRule ^tags/([0-9]+)\.html$ tags\.php\?\/$1\/RewriteRule ^tags/([0-9]+)_([0-9]+)\.html$ tags\.php\?\/$1\/$2RewriteRule ^tags/([0-9]+)_([0-9]+)\.html$ tags\.php\?\/$1\/$2\/
Nginx
rewrite ^/tags\.html$ /tags.php;rewrite ^/tags/([0-9]+)\.html$ /tags.php?\/$1;rewrite ^/tags/([0-9]+)\.html$ /tags.php?\/$1\/;rewrite ^/tags/([0-9]+)_([0-9]+)\.html$ /tags.php?\/$1\/$2;rewrite ^/tags/([0-9]+)_([0-9]+)\.html$ /tags.php?\/$1\/$2\/;
web.config (iis7 iis8)
<rule name="tag首頁(yè)"><match url="^tags.html$" ignoreCase="false" /><action type="Rewrite" url="tags.php" appendQueryString="false" /></rule><rule name="tag列表"><match url="^tags/([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}" appendQueryString="false" /></rule><rule name="tag列表最后有左斜杠"><match url="^tags/([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" /></rule><rule name="tag列表分頁(yè)"><match url="^tags/([0-9]+)_([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" /></rule><rule name="tag列表分頁(yè)最后有左斜杠"><match url="^tags/([0-9]+)_([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/{R:2}/" appendQueryString="false" /></rule>
如需后臺(tái)TAG標(biāo)簽管理里的TAG鏈接點(diǎn)擊打開(kāi)也是偽靜態(tài)可這樣改

打開(kāi) /dede/templets/tags_main.htm 找到 89行
<a href="../tags.php?/<?php echo urlencode($fields['tag']); ?>/" target="_blank">{dede:field.tag /}</a>
改成
<a href="../tags/{dede:field.id /}.html" target="_blank">{dede:field.tag /}</a>
手機(jī)站TAG偽靜態(tài)實(shí)現(xiàn)教程
1、m 文件夾添加tags.php文件給手機(jī)站使用
2、手機(jī)站TAG標(biāo)簽偽靜態(tài)規(guī)則,根據(jù)自己網(wǎng)站的主機(jī)環(huán)境選擇下面的規(guī)則
.htaccess (Apache 放到m文件夾下)
RewriteEngine OnRewriteBase /RewriteRule ^tags\.html$ tags\.phpRewriteRule ^tags/([0-9]+)\.html$ tags\.php\?\/$1 [L]RewriteRule ^tags/([0-9]+)\.html$ tags\.php\?\/$1\/RewriteRule ^tags/([0-9]+)_([0-9]+)\.html$ tags\.php\?\/$1\/$2RewriteRule ^tags/([0-9]+)_([0-9]+)\.html$ tags\.php\?\/$1\/$2\/
Nginx
rewrite ^/tags\.html$ /tags.php;rewrite ^/tags/([0-9]+)\.html$ /tags.php?\/$1;rewrite ^/tags/([0-9]+)\.html$ /tags.php?\/$1\/;rewrite ^/tags/([0-9]+)_([0-9]+)\.html$ /tags.php?\/$1\/$2;rewrite ^/tags/([0-9]+)_([0-9]+)\.html$ /tags.php?\/$1\/$2\/;
web.config (iis7 iis8)
<rule name="tag首頁(yè)"><match url="^tags.html$" ignoreCase="false" /><action type="Rewrite" url="tags.php" appendQueryString="false" /></rule><rule name="tag列表"><match url="^tags/([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}" appendQueryString="false" /></rule><rule name="tag列表最后有左斜杠"><match url="^tags/([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" /></rule><rule name="tag列表分頁(yè)"><match url="^tags/([0-9]+)_([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" /></rule><rule name="tag列表分頁(yè)最后有左斜杠"><match url="^tags/([0-9]+)_([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/{R:2}/" appendQueryString="false" /></rule>
3、手機(jī)站TAG標(biāo)簽首頁(yè)和TAG標(biāo)簽列表頁(yè)模板為
- tag_m.htm
- taglist_m.htm
4、TAG標(biāo)簽調(diào)用與電腦站一樣