织梦联动地区apache伪静态规则(3)

$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;

}

打开/include/arc.sglistview.class.php 找到

$row['ismake'] = 1;

改成

$row['ismake'] = -1;

继续找到

global $nativeplace,$infotype,$keyword;

改成

global $cfg_rewrite,$nativeplace,$infotype,$keyword;

继续找到

$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&keyword=".urlencode($keyword)."&";

改成

// 如果开启为静态,则对规则进行替换

if($cfg_rewrite == 'Y')

{

    $nowurls = preg_replace("/\-/", ".php?", $purl);

    $nowurls = explode("?", $nowurls);

    $purl = $nowurls[0];

}

$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&";

最后找到

$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;

改成

$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;

if($cfg_rewrite == 'Y')

{

    $plist = str_replace('.php?tid=', '-', $plist);

    $plist = str_replace('&TotalResult=', '-', $plist);

    $plist = str_replace('&nativeplace=', '-', $plist);

    $plist = str_replace('&infotype=', '-', $plist);

    $plist = preg_replace("/&PageNo=(\d+)/i",'-\\1.html',$plist);

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsfgjz.html