-
齒輪設(shè)備類網(wǎng)站織夢(mèng)模板...
-
新型智能礦山鉆機(jī)設(shè)備類...
-
電子產(chǎn)品營(yíng)銷類網(wǎng)站織夢(mèng)...
-
紙糊模塑纖維成型企業(yè)類...
-
醫(yī)療器械診斷設(shè)備類網(wǎng)站...
-
婚紗攝影定制類網(wǎng)站織夢(mèng)...
-
中英雙語(yǔ)建材瓷磚裝飾類...
-
電子數(shù)碼音響類網(wǎng)站織夢(mèng)...
-
酒店民宿客房類網(wǎng)站織夢(mèng)...
-
航運(yùn)造船廠設(shè)備類網(wǎng)站織...
-
風(fēng)景攝影類網(wǎng)站織夢(mèng)模板...
-
新聞資訊游戲博客類網(wǎng)站...
-
智能鎖具電子產(chǎn)品類網(wǎng)站...
-
金融財(cái)經(jīng)貨幣資訊類網(wǎng)站...
-
凈化水處理設(shè)備類網(wǎng)站織...
-
餐飲加盟培訓(xùn)管理類網(wǎng)站...
-
環(huán)保家居家具類網(wǎng)站織夢(mèng)...
-
金屬工藝品加工廠家類網(wǎng)...
-
旅游公司類網(wǎng)站織夢(mèng)模板...
-
離心風(fēng)機(jī)設(shè)備機(jī)械設(shè)備類...
無(wú)論你網(wǎng)站全站是靜態(tài)或者動(dòng)態(tài)還是偽靜態(tài),此教程都可以設(shè)置TAG標(biāo)簽頁(yè)為偽靜態(tài),并且是單鏈接名稱的形式
按此教程操作后,電腦站TAG標(biāo)簽url會(huì)像如下:
- TAG標(biāo)簽首頁(yè) http://m.gjgbw.com/tags.html
- TAG標(biāo)簽列表 http://m.gjgbw.com/tags/織夢(mèng).html
- TAG標(biāo)簽分頁(yè) http://m.gjgbw.com/tags/織夢(mèng)_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/織夢(mèng).html
- TAG標(biāo)簽分頁(yè) http://m.91084.com/tags/織夢(mèng)_2.html
電腦站TAG偽靜態(tài)實(shí)現(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標(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\/$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首頁(yè)"><match url="^tags.html$" ignoreCase="false" /><action type="Rewrite" url="tags.php" appendQueryString="false" /></rule><rule name="tag列表分頁(yè)"><match url="^tags/(.*)_([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]+).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>
如需后臺(tái)TAG標(biāo)簽管理里的TAG鏈接點(diǎn)擊打開也是偽靜態(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>
手機(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\/$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首頁(yè)"><match url="^tags.html$" ignoreCase="false" /><action type="Rewrite" url="tags.php" appendQueryString="false" /></rule><rule name="tag列表分頁(yè)"><match url="^tags/(.*)_([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]+).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、手機(jī)站TAG標(biāo)簽首頁(yè)和TAG標(biāo)簽列表頁(yè)模板為
- tag_m.htm
- taglist_m.htm
4、TAG標(biāo)簽調(diào)用與電腦站一樣



