花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來(lái)到素材無(wú)憂網(wǎng),按 + 收藏我們
登錄 注冊(cè) 退出 找回密碼

織夢(mèng)電腦站手機(jī)站TAG標(biāo)簽偽靜態(tài)-單鏈接名稱(chēng)版

時(shí)間: 2020-09-15 15:33 閱讀: 作者:素材無(wú)憂網(wǎng)

電腦站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 On
RewriteBase /
RewriteRule ^tags\.html$	tags\.php
RewriteRule ^tags/(.*)_([0-9]+)\.html$	tags\.php\?\/$1\/$2
RewriteRule ^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>

打開(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/<?php echo urlencode($fields['tag']); ?>.html" target="_blank">{dede:field.tag /}</a>

手機(jī)站TAG偽靜態(tài)實(shí)現(xiàn)教程

1、m 文件夾添加tags.php文件給手機(jī)站使用(點(diǎn)擊下方下載)

 下載此插件

2、手機(jī)站TAG標(biāo)簽偽靜態(tài)規(guī)則,根據(jù)自己網(wǎng)站的主機(jī)環(huán)境選擇下面的規(guī)則

.htaccess (Apache 放到m文件夾下)

RewriteEngine On
RewriteBase /
RewriteRule ^tags\.html$	tags\.php
RewriteRule ^tags/(.*)_([0-9]+)\.html$	tags\.php\?\/$1\/$2
RewriteRule ^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)用與電腦站一樣

版權(quán)聲明: 本站資源均來(lái)自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!

轉(zhuǎn)載請(qǐng)注明: 織夢(mèng)電腦站手機(jī)站TAG標(biāo)簽偽靜態(tài)-單鏈接名稱(chēng)版

相關(guān)文章
模板推薦