国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

織夢電腦站手機(jī)站TAG標(biāo)簽偽靜態(tài)-漢字名稱版

2024-07-12 09:08:05
字體:
供稿:網(wǎng)友

無論你網(wǎng)站全站是靜態(tài)或者動態(tài)還是偽靜態(tài),此教程都可以設(shè)置TAG標(biāo)簽頁為偽靜態(tài),并且是單鏈接漢字名稱的形式

按此教程操作后,電腦站TAG標(biāo)簽url會像如下:

TAG標(biāo)簽首頁 https://www.CUOxin.com/tags.html

TAG標(biāo)簽列表 https://www.CUOxin.com/tags/織夢.html

TAG標(biāo)簽分頁 https://www.CUOxin.com/tags/織夢_2.html

按此教程操作后,手機(jī)站TAG標(biāo)簽url會像如下:

TAG標(biāo)簽首頁 https://m.CUOxin.com/tags.html

TAG標(biāo)簽列表 https://m.CUOxin.com/tags/織夢.html

TAG標(biāo)簽分頁 https://m.CUOxin.com/tags/織夢_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','_.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首頁"><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標(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ī)站使用

附下載地址:

織夢手機(jī)站TAG標(biāo)簽偽靜態(tài)-添加tags.php文件.zip

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首頁"><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、手機(jī)站TAG標(biāo)簽首頁和TAG標(biāo)簽列表頁模板為

tag_m.htm

taglist_m.htm

4、TAG標(biāo)簽調(diào)用與電腦站一樣

發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 钟祥市| 常山县| 公安县| 金秀| 永昌县| 延安市| 武冈市| 突泉县| 保德县| 米脂县| 新乡县| 和平区| 西平县| 维西| 福清市| 唐山市| 武冈市| 枣强县| 天峻县| 宁波市| 合作市| 漳平市| 南和县| 永丰县| 青浦区| 赤水市| 德保县| 中卫市| 彩票| 上林县| 铁岭县| 汾阳市| 阜城县| 汾阳市| 星座| 涟源市| 错那县| 淄博市| 那曲县| 呼玛县| 郧西县|