@@ -227,8 +227,8 @@ | |||||
<p>{tid} 栏目id</p> | <p>{tid} 栏目id</p> | ||||
<p>{page} 栏目页码数</p> | <p>{page} 栏目页码数</p> | ||||
<p>伪静态规则(Nginx)</p> | <p>伪静态规则(Nginx)</p> | ||||
<p>rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1;</p> | |||||
<p>rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&pageno=$2;</p> | |||||
<p>rewrite ^/list/([0-9]+)$ /apps/list.php?tid=$1;</p> | |||||
<p>rewrite ^/list/([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&pageno=$2;</p> | |||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
@@ -85,8 +85,8 @@ | |||||
<p>{tid} 栏目id</p> | <p>{tid} 栏目id</p> | ||||
<p>{page} 栏目页码数</p> | <p>{page} 栏目页码数</p> | ||||
<p>伪静态规则(Nginx)</p> | <p>伪静态规则(Nginx)</p> | ||||
<p>rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1;</p> | |||||
<p>rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&pageno=$2;</p> | |||||
<p>rewrite ^/list/([0-9]+)$ /apps/list.php?tid=$1;</p> | |||||
<p>rewrite ^/list/([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&pageno=$2;</p> | |||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
@@ -210,8 +210,8 @@ | |||||
<p>{tid} 栏目id</p> | <p>{tid} 栏目id</p> | ||||
<p>{page} 栏目页码数</p> | <p>{page} 栏目页码数</p> | ||||
<p>伪静态规则(Nginx)</p> | <p>伪静态规则(Nginx)</p> | ||||
<p>rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1;</p> | |||||
<p>rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&pageno=$2;</p> | |||||
<p>rewrite ^/list/([0-9]+)$ /apps/list.php?tid=$1;</p> | |||||
<p>rewrite ^/list/([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&pageno=$2;</p> | |||||
</div> | </div> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
@@ -1146,7 +1146,7 @@ class ListView | |||||
//开启伪静态对规则替换 | //开启伪静态对规则替换 | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$purl = str_replace("/apps", "", $purl); | $purl = str_replace("/apps", "", $purl); | ||||
$nowurls = preg_replace("/\-/", ".php?", $purl); | |||||
$nowurls = preg_replace("/", ".php?", $purl); | |||||
$nowurls = explode("?", $nowurls); | $nowurls = explode("?", $nowurls); | ||||
$purl = $nowurls[0]; | $purl = $nowurls[0]; | ||||
} | } | ||||
@@ -1203,7 +1203,7 @@ class ListView | |||||
if (preg_match('/info/i', $listitem)) $plist .= $maininfo; | if (preg_match('/info/i', $listitem)) $plist .= $maininfo; | ||||
//伪静态栏目分页 | //伪静态栏目分页 | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$plist = str_replace(".php?tid=", "-", $plist); | |||||
$plist = str_replace("?tid=", "", $plist); | |||||
$plist = preg_replace("/&pageno=(\d+)/i", "-\\1", $plist); | $plist = preg_replace("/&pageno=(\d+)/i", "-\\1", $plist); | ||||
$plist = preg_replace("/&TotalResult=(\d+)/i", "", $plist);//去掉分页数值 | $plist = preg_replace("/&TotalResult=(\d+)/i", "", $plist);//去掉分页数值 | ||||
} | } | ||||
@@ -982,7 +982,7 @@ class SgListView | |||||
//开启伪静态对规则替换 | //开启伪静态对规则替换 | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$purl = str_replace("/apps", "", $purl); | $purl = str_replace("/apps", "", $purl); | ||||
$nowurls = preg_replace("/\-/", ".php?", $purl); | |||||
$nowurls = preg_replace("/", ".php?", $purl); | |||||
$nowurls = explode("?", $nowurls); | $nowurls = explode("?", $nowurls); | ||||
$purl = $nowurls[0]; | $purl = $nowurls[0]; | ||||
} | } | ||||
@@ -1031,9 +1031,9 @@ class SgListView | |||||
$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | $plist = $indexpage.$prepage.$listdd.$nextpage.$endpage; | ||||
//伪静态栏目分页 | //伪静态栏目分页 | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
$plist = str_replace(".php?tid=", "-", $plist); | |||||
$plist = str_replace("?tid=", "", $plist); | |||||
$plist = preg_replace("/&pageno=(\d+)/i", "-\\1", $plist); | $plist = preg_replace("/&pageno=(\d+)/i", "-\\1", $plist); | ||||
$plist = preg_replace("/&TotalResult=(\d+)&/i", "?", $plist);//去掉分页数值 | |||||
$plist = preg_replace("/&TotalResult=(\d+)/i", "", $plist);//去掉分页数值 | |||||
} | } | ||||
return $plist; | return $plist; | ||||
} | } | ||||
@@ -141,8 +141,8 @@ if (!function_exists('GetTypeUrl')) { | |||||
//动态栏目 | //动态栏目 | ||||
if ($isdefault == -1) { | if ($isdefault == -1) { | ||||
if ($cfg_rewrite == 'Y') { | if ($cfg_rewrite == 'Y') { | ||||
//开启伪静态栏目/list-1、/list-2,则分页/list-1-1、/list-1-2 | |||||
$reurl = $GLOBALS['cfg_cmspath']."/list-".$typeid; | |||||
//开启伪静态栏目/list/1、/list/2,则分页/list/1-1、/list/1-2 | |||||
$reurl = $GLOBALS['cfg_cmspath']."/list/".$typeid; | |||||
} else { | } else { | ||||
$reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; | $reurl = $GLOBALS['cfg_phpurl']."/list.php?tid=".$typeid; | ||||
} | } | ||||