最新活动:电脑PC端+手机端+微网站+自适应网页多模板选择-建站388元起价!!!
当前位置:主页 > 网站建设 > 织梦CMS分类信息联动地区伪静态+apache伪静态规则

织梦CMS分类信息联动地区伪静态+apache伪静态规则

时间:2023-05-25 11:05:25 阅读: 文章分类: 网站建设 作者: 网站技术员

导读:织梦技巧织梦技巧dedecms织梦分类信息联动地区伪静态+apache伪静态规则,需要的同学可以看看,由于改动多,需要对比修改的同学可以用【 Beyond Compare 】软网站seo优化企业网站建设。

网站seo优化企业网站建设dedecms织梦分类信息联动地区伪静态+apache伪静态规则,需要的同学可以看看,由于改动多,需要对比修改的同学可以用【 Beyond Compare 】软件来修改 apache 分类信息联动地区伪静态规则 RewriteRule ^category/list-(-[0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?channelid= $1 tid= $2 nativeplace= $3 infotype= $4 RewriteRule […]

dedecms织梦分类信息联动地区伪静态+apache伪静态规则,需要的同学可以看看,由于改动多,需要对比修改的同学可以用【Beyond Compare】软件来修改

apache 分类信息联动地区伪静如何seo优化推广网站态规则

RewriteRule ^category/list-(-[0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?channelid=$1&tid=$2&nativeplace=$3&infotype=$4 RewriteRule ^category/list-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&TotalResult=$2&nativeplace=$3&infotype=$4&PageNo=$5

/include/taglib/infolink.lib.php  整个文件修改为

<?php if(!defined('DEDEINC')) exit('Request Error!'); /** * 分类信息地区与类型快捷链接 * * @version $Id: infolink.lib.php 1 9:29 2010年7月6日Z tianya $ * @package DedeCMS.Taglib * @copyright Copyright (c) 2007 - 2010, DesDev, Inc. * @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com */ /*>>dede>> <name>分类信息地区与类型快捷链接</name> <type>全局标记</type> <for>V55,V56,V57</for> <description>调用分类信息地区与类型快捷链接</description> <demo> {dede:infolink /} </demo> <attributes> </attributes> >>dede>>*/ require_once(DEDEINC.'/enums.func.php'); require_once(DEDEDATA.'/enums/nativeplace.php'); require_once(DEDEDATA.'/enums/infotype.php'); function lib_infolink(&$ctag,&$refObj) { global $cfg_rewrite,$dsql,$nativeplace,$infotype,$hasSetEnumJs,$cfg_cmspath,$cfg_mainsite; global $em_nativeplaces,$em_infotypes; //属性处理 //$attlist="row|12,titlelen|24"; //FillAttsDefault($ctag->CAttribute->Items,$attlist); //extract($ctag->CAttribute->Items, EXTR_SKIP); $cmspath = ( (empty($cfg_cmspath) || !preg_match("#\/$#", $cfg_cmspath)) ? $cfg_cmspath.'/' : $cfg_cmspath ); $baseurl = preg_replace("#\/$#", '', $cfg_mainsite).$cmspath; $smalltypes = ''; if( !empty($refObj->TypeLink->TypeInfos['smalltypes']) ) { $smalltypes = explode(',', $refObj->TypeLink->TypeInfos['smalltypes']); } if(empty($refObj->Fields['typeid'])) { $row = $dsql->GetOne("SELECT id FROM `58pic_arctype` WHERE channeltype='-8' And reid = '0' "); $typeid = (is_array($row) ? $row['id'] : 0); } else { $typeid = $refObj->Fields['typeid']; } $innerText = trim($ctag->GetInnerText()); if(empty($innerText)) $innerText = GetSysTemplets("info_link.htm"); $ctp = new DedeTagParse(); $ctp->SetNameSpace('field','[',']'); $ctp->LoadSource($innerText); $revalue = $seli = ''; $channelid = ( empty($refObj->TypeLink->TypeInfos['channeltype']) ? -8 : $refObj->TypeLink->TypeInfos['channeltype'] ); $fields = array('nativeplace'=>'','infotype'=>'','typeid'=>$typeid, 'channelid'=>$channelid,'linkallplace'=>'','linkalltype'=>''); $fields['nativeplace'] = $fields['infotype'] = ''; //伪静态 if($cfg_rewrite == 'Y') { $rwlinkallplace = "/category/list-".$channelid."-".$typeid."-".$infotype."-0.html"网站优化seo培训;; $fields['linkallplace'] = "<a href='{$rwlinkallplace}'>不限</a>"; } else { $fields['linkallplace'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$infotype}'>不限</a>"; } //伪静态 if($cfg_rewrite == 'Y') { $rwlinkalltype = "/category/list-".$channelid."-".$typeid."-".$nativeplace."-0.html"; $fields['linkalltype'] = "<a href='{$rwlinkalltype}'>不限</a>"; } else { $fields['linkalltype'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$nativeplace}'>不限</a>"; } //地区链接 if(empty($nativeplace)) { foreach($em_nativeplaces as $eid=>$em) { if($eid % 500 != 0) continue; //伪静态 if($cfg_rewrite == 'Y') { $rwnativeplace = "/category/list-".$channelid."-".$typeid."-".$eid."-".$infotype.".html"; $fields['nativeplace'] .= "<a href='{$rwnativeplace}'>{$em}</a>"; } else { $fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a>\r\n"; } } } else { $sontype = ( ($nativeplace % 500 != 0) ? $nativeplace : 0 ); $toptype = ( ($nativeplace % 500 == 0) ? $nativeplace : ( $nativeplace-($nativeplace%500) ) ); //2011-6-21 修改地区列表的一个小空格 论坛http://bbs.dedecms.com/371492.html(by:织梦的鱼) //伪静态 if($cfg_rewrite == 'Y') { $rwnativeplace = "/category/list-".$channelid."-".$typeid."-".$toptype."-".$infotype.".html"; $fields['nativeplace'] = "<a href='{$rwnativeplace}'> <b>{$em_nativeplaces[$toptype]}</b></a> &gt;&gt; "; } else { $fields['nativeplace'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$toptype}&infotype={$infotype}'> <b>{$em_nativeplaces[$toptype]}</b></a> &gt;&gt; "; } foreach($em_nativeplaces as $eid=>$em) { if($eid < $toptype+1 || $eid > $toptype+499) continue; if($eid == $nativeplace) { $fields['nativeplace'] .= " <b>{$em}</b>\r\n"; } else { //伪静态 if($cfg_rewrite == 'Y') { $rwnativeplace = "/category/list-".$channelid."-".$typeid."-".$eid."-".$infotype.".html"; $fields['nativeplace'] .= "<a href='{$rwnativeplace}'>{$em}</a>\r\n"; } else { $fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a>\r\n"; } } } } //小分类链接 if(empty($infotype) || is_array($smalltypes)) { foreach($em_infotypes as $eid=>$em) { if(!is_array($smalltypes) && $eid % 500 != 0) continue; if(is_array($smalltypes) && !in_array($eid, $smalltypes)) continue; if($eid == $infotype) { $fields['infotype'] .= " <b>{$em}</b>\r\n"; } else { //伪静态 if($cfg_rewrite == 'Y') { $rwinfotype = "/category/list-".$channelid."-".$typeid.&quo建设网站t;-".$eid."-".$nativeplace.".html"; $fields['infotype'] .= " <a href='{$rwinfotype}'>{$em}</a>\r\n"; } else { $fields['infotype'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$eid}&nativeplace={$nativeplace}'>{$em}</a>\r\n"; } } } } else { $sontype = ( ($infotype % 500 != 0) ? $infotype : 0 ); $toptype = ( ($infotype % 500 == 0) ? $infotype : ( $infotype-($infotype%500) ) ); //伪静态 if($cfg_rewrite == 'Y') { $rwinfotype = "/category/list-".$channelid."-".$typeid."-".$toptype."-".$nativeplace.".html"; $fields['infotype'] .= "<a href='{$rwinfotype}'><b>{$em_infotypes[$toptype]}</b></a> &gt;&gt; "; } else { $fields['infotype'] .= "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$toptype}&nativeplace={$nativeplace}'><b>{$em_infotypes[$toptype]}</b></a> &gt;&gt; "; } foreach($em_infotypes as $eid=>$em) { if($eid < $toptype+1 || $eid > $toptype+499) continue; if($eid == $infotype) { $fields['infotype'] .= " <b>{$em}</b>\r\n"; } else { //伪静态 if($cfg_rewrite == 'Y') { $rwinfotype = "/category/list-".$channelid."-".$typeid."-".$eid."-".$nativeplace.".html"; $fields['infotype'] .= "<a href='{$rwinfotype}'><b>{$em_infotypes[$toptype]}</b></a> &gt;&gt; "; } else { $fields['infotype'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$eid}&nativeplace={$nativeplace}'>{$em}</a>\r\n"; } } } } if(is_array($ctp->CTags)) { foreach($ctp->CTags as $tagid=>$ctag) { if(isset($fields[$ctag->GetName()])) { $ctp->Assign($tagid,$fields[$ctag->GetName()]); } } $revalue .= $ctp->GetResult(); } return $revalue; }

关键词标签: CMS 静态 分类信息

声明: 本文由我的SEOUC技术文章主页发布于:2023-05-25 ,文章织梦CMS分类信息联动地区伪静态+apache伪静态规则主要讲述静态,分类信息,CMS网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_8265.html

我的IDC 网站建设技术SEOUC.COM
专注网站建设,SEO优化,小程序设计制作搭建开发定制网站等,数千家网站定制开发案例,网站推广技术服务。
  • 5000+合作客服
  • 8年从业经验
  • 150+覆盖行业
  • 最新热门源码技术文章