| 在栏目设置----生成选项里面
 列表模式 和 内容页模式 依然选择静态
 
 然后在其他一些选择是否生成列表页内容页的选项里面都选择不生成就可以了
 
 以下的是列表页的==================================
 为了不影响到使用结合项的功能
 
 第一步:
 复制 eactionListInfo.php 为 ListInfo_wjt.php
 
 第二步:
 打开 ListInfo_wjt.php
 
 第三步:
 找到:$page=(int)$_GET['page'];
 改成:$page=(int)$_GET['page']-1;//haoyl.com 伪静态修改标记
 
 第四步:
 找到:$listpage=page1($num,$line,$page_line,$start,$page,$search);
 改成:$listpage=pagewjt($num,$search,$dolink);//haoyl.com 伪静态修改标记
 
 第五步:
 
 打开 eclassconnect.php
 
 找到://前台分页 在上面加上以下代码
 
 //列表页伪静态-----------haoyl.com
 function pagewjt($num,$dolink){
 global $fun_r;
 if($num<=$line)
 {
 return '';
 }
 $type='.html';
 $url=$_SERVER['PHP_SELF'].'?page';
 $snum=2;//最小页数
 $totalpage=ceil($num/$line);//取得总页数
 $firststr='';
 //上一页
 if($page<>0)
 {
 $toppage='<a href="'.$dolink.'index'.$type.'">'.$fun_r['startpage'].'</a>';
 $pagepr=$page;
 if($pagepr==1)
 {
 $prido="index".$type;
 }
 else
 {
 $prido="index_".$pagepr.$type;
 }
 $prepage='<a href="'.$dolink.$prido.'">'.$fun_r['pripage'].'</a>';
 }
 //下一页
 if($page!=$totalpage-1)
 {
 $pagenex=$page+2;
 $nextpage='<a href="'.$dolink.'index_'.$pagenex.$type.'">'.$fun_r['nextpage'].'</a>';
 $lastpage='<a href="'.$dolink.'index_'.$totalpage.$type.'">'.$fun_r['lastpage'].'</a>';
 }
 $starti=$page-$snum<1?1:$page-$snum;
 $no=0;
 for($i=$starti;$i<=$totalpage&&$no<$page_line;$i++)
 
 {
 $no++;
 if($page==$izzi)
 {
 $is_1='<a class="on" href="#">';
 $is_2="</a>";
 }
 elseif($i==1)
 {
 $is_1='<a href="'.$dolink.'index'.$type.'">';
 $is_2="</a>";
 }
 else
 {
 $is_1='<a href="'.$dolink.'index_'.$i.$type.'">';
 $is_2="</a>";
 }
 $izzi=$i;
 $izz=$i+2;
 $pagenum=$i;
 $returnstr.="".$is_1.$pagenum.$is_2;
 }
 
 $returnstr=$firststr.$toppage.$prepage.$returnstr.$nextpage.$lastpage;
 return $returnstr;
 }
 
 以下为列表页伪静态规则
 
 RewriteRule ^栏目目录名/$ e/action/ListInfo_wjt.php?page=1&classid=栏目id
 RewriteRule ^栏目目录名/index.html$ e/action/ListInfo_wjt.php?page=1&classid=栏目id
 RewriteRule ^栏目目录名/index_([0-9]+).html$ e/action/ListInfo_wjt.php?page=$1&classid=栏目id
 
 这样的话 每个栏目都需要3条规则,对于栏目少的话 不太所谓 如果栏目多的话 你可以在栏目目录名的地址使用([a-z]+)来代替 但需要自己修改一下 ListInfo_wjt.php 给予classid数值
 
 这个方法是比较简单的方法,不太会php,高手别见笑!
 
 本人两个站 内容页和列表页都是伪静态的
 
 以下是内容页的伪静态
 
 打开 eactionShowInfo.php
 
 找到:$page=(int)$_GET['page'];
 改成:$page=(int)$_GET['page']-1;
 
 把以下的内容删除
 
 //是否支持动态内容页
 if($class_r[$classid]['showdt']!=2)
 {
 $titleurl=sys_ReturnBqTitleLink($r);
 Header("Location:$titleurl");
 exit();
 }
 
 找到:$search="&classid=$classid&id=$id";
 改成:$search="$id";
 
 找到:$truepage=page1($thispagenum,$search);
 改成:$truepage=pagewjt_1($thispagenum,$dolink);//haoyl.com
 
 打开 eclassconnect.php
 
 找到 //前台分页
 
 在上面加上以下代码
 
 //内容页伪静态-----------haoyl.com
 function pagewjt_1($num,$dolink){
 global $fun_r;
 if($num<=$line)
 {
 return '';
 }
 $search=htmlspecialchars($search,ENT_QUOTES);
 $type='.html';
 $url=$_SERVER['PHP_SELF'].'?page';
 $snum=2;//最小页数
 $totalpage=ceil($num/$line);//取得总页数
 $firststr='';
 //上一页
 if($page<>0)
 {
 $toppage='<a href="'.$dolink.$search.$type.'">'.$fun_r['startpage'].'</a>';
 $pagepr=$page;
 if($pagepr==1)
 {
 $prido=$search.$type;
 }
 else
 {
 $prido=$search."_".$pagepr.$type;
 }
 $prepage='<a href="'.$dolink.$prido.'">'.$fun_r['pripage'].'</a>';
 }
 //下一页
 if($page!=$totalpage-1)
 {
 $pagenex=$page+2;
 $nextpage='<a href="'.$dolink.$search.'_'.$pagenex.$type.'">'.$fun_r['nextpage'].'</a>';
 $lastpage='<a href="'.$dolink.$search.'_'.$totalpage.$type.'">'.$fun_r['lastpage'].'</a>';
 }
 $starti=$page-$snum<1?1:$page-$snum;
 $no=0;
 for($i=$starti;$i<=$totalpage&&$no<$page_line;$i++)
 
 {
 $no++;
 if($page==$izzi)
 {
 $is_1='<a class="on" href="#">';
 $is_2="</a>";
 }
 elseif($i==1)
 {
 $is_1='<a href="'.$dolink.$search.$type.'">';
 $is_2="</a>";
 }
 else
 {
 $is_1='<a href="'.$dolink.$search.'_'.$i.$type.'">';
 $is_2="</a>";
 }
 $izzi=$i;
 $izz=$i+2;
 $pagenum=$i;
 $returnstr.="".$is_1.$pagenum.$is_2;
 }
 
 $returnstr=$firststr.$toppage.$prepage.$returnstr.$nextpage.$lastpage;
 return $returnstr;
 }
 
 以下为内容页伪静态规则
 
 RewriteRule ^栏目目录名/([0-9]+).html$ e/action/ShowInfo.php?classid=栏目id&id=$1&page=1
 RewriteRule ^栏目目录名/([0-9]+)_([0-9]+).html$ e/action/ShowInfo.php?classid=栏目id&id=$1&page=$2
 
 (编辑:宣城站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |