-
攝影拍攝短視頻類網(wǎng)站織...
-
車輛機油工業(yè)潤滑油類網(wǎng)...
-
中藥藥材百科資訊類網(wǎng)站...
-
網(wǎng)站建設(shè)營銷類網(wǎng)站織夢...
-
水性工業(yè)漆類企業(yè)網(wǎng)站織...
-
水上樂園設(shè)備類網(wǎng)站織夢...
-
園林綠化景觀建設(shè)類網(wǎng)站...
-
辦公學習教程資訊類網(wǎng)站...
-
農(nóng)業(yè)機械設(shè)備類網(wǎng)站織夢...
-
園林景觀設(shè)計類網(wǎng)站織夢...
-
LED顯示屏中英雙外貿(mào)類網(wǎng)...
-
環(huán)保電動掃地車類網(wǎng)站織...
-
環(huán)保設(shè)備研發(fā)制造類網(wǎng)站...
-
汽車配件類網(wǎng)站織夢模板...
-
灶具電器設(shè)備類網(wǎng)站織夢...
-
企業(yè)公司行業(yè)通用類網(wǎng)站...
-
潮流資訊信息類網(wǎng)站織夢...
-
新媒體自媒體運營資訊類...
-
APP應用程序官網(wǎng)類網(wǎng)站織...
-
道路護欄交通設(shè)施類網(wǎng)站...
無論你網(wǎng)站全站是靜態(tài)或者動態(tài)還是偽靜態(tài),此教程都可以設(shè)置TAG標簽頁為偽靜態(tài),并且是單鏈接名稱的形式
按此教程操作后,電腦站TAG標簽url會像如下:
- TAG標簽首頁 http://www.sfmr1.cn/tags.html
- TAG標簽列表 http://www.sfmr1.cn/tags/織夢.html
- TAG標簽分頁 http://www.sfmr1.cn/tags/織夢_2.html
按此教程操作后,手機站TAG標簽url會像如下:
- TAG標簽首頁 http://m.91084.com/tags.html
- TAG標簽列表 http://m.91084.com/tags/織夢.html
- TAG標簽分頁 http://m.91084.com/tags/織夢_2.html
電腦站TAG偽靜態(tài)實現(xiàn)教程
1、/tags.php 找到 18行
if(isset($tags[2])) $PageNo = intval($tags[2]);
在它下面加入
define('DEDERETAG', 'Y');
2、/include/taglib/tag.lib.php 找到 87行
$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";
改成
$row['link'] = $cfg_cmsurl."/tags/".urlencode($row['keyword']).".html";
3、/include/arc.taglist.class.php 找到 458行
$purl .= "?/".urlencode($this->Tag);
改成
if(!defined('DEDERETAG')){$purl .= "?/".urlencode($this->Tag);}else{$purl = $GLOBALS['cfg_cmsurl']."/tags/".urlencode($this->Tag).".html";}
繼續(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標簽偽靜態(tài)規(guī)則,根據(jù)自己網(wǎng)站的主機環(huán)境選擇下面的規(guī)則
.htaccess (Apache)
RewriteEngine OnRewriteBase /RewriteRule ^tags\.html$ tags\.phpRewriteRule ^tags/(.*)_([0-9]+)\.html$ tags\.php\?\/$1\/$2RewriteRule ^tags/(.*)_([0-9]+)\.html$ tags\.php\?\/$1\/$2\/RewriteRule ^tags/(.*)\.html$ tags\.php\?\/$1 [L]RewriteRule ^tags/(.*)\.html$ tags\.php\?\/$1\/
Nginx
rewrite "^/tags\.html$" /tags.php;rewrite "^/tags/(.*)_([0-9]+)\.html$" /tags.php?/$1/$2/ last;rewrite "^/tags/(.*)\.html$" /tags.php?/$1/;
web.config (iis7 iis8)
<rule name="tag首頁"><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}/{R:2}" appendQueryString="false" /></rule><rule name="tag列表分頁最后有左斜杠"><match url="^tags/(.*)_([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/{R:2}/" appendQueryString="false" /></rule><rule name="tag列表"><match url="^tags/(.*).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}" appendQueryString="false" /></rule><rule name="tag列表最后有左斜杠"><match url="^tags/(.*).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" /></rule>
如需后臺TAG標簽管理里的TAG鏈接點擊打開也是偽靜態(tà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/<?php echo urlencode($fields['tag']); ?>.html" target="_blank">{dede:field.tag /}</a>
手機站TAG偽靜態(tài)實現(xiàn)教程
1、m 文件夾添加tags.php文件給手機站使用
2、手機站TAG標簽偽靜態(tài)規(guī)則,根據(jù)自己網(wǎng)站的主機環(huán)境選擇下面的規(guī)則
.htaccess (Apache 放到m文件夾下)
RewriteEngine OnRewriteBase /RewriteRule ^tags\.html$ tags\.phpRewriteRule ^tags/(.*)_([0-9]+)\.html$ tags\.php\?\/$1\/$2RewriteRule ^tags/(.*)_([0-9]+)\.html$ tags\.php\?\/$1\/$2\/RewriteRule ^tags/(.*)\.html$ tags\.php\?\/$1 [L]RewriteRule ^tags/(.*)\.html$ tags\.php\?\/$1\/
Nginx
rewrite "^/tags\.html$" /tags.php;rewrite "^/tags/(.*)_([0-9]+)\.html$" /tags.php?/$1/$2/ last;rewrite "^/tags/(.*)\.html$" /tags.php?/$1/;
web.config (iis7 iis8)
<rule name="tag首頁"><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}/{R:2}" appendQueryString="false" /></rule><rule name="tag列表分頁最后有左斜杠"><match url="^tags/(.*)_([0-9]+).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/{R:2}/" appendQueryString="false" /></rule><rule name="tag列表"><match url="^tags/(.*).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}" appendQueryString="false" /></rule><rule name="tag列表最后有左斜杠"><match url="^tags/(.*).html$" ignoreCase="false" /><action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" /></rule>
3、手機站TAG標簽首頁和TAG標簽列表頁模板為
- tag_m.htm
- taglist_m.htm
4、TAG標簽調(diào)用與電腦站一樣





