From 6a50c1c3d49f87953122cc1b156fbf8084ced0eb Mon Sep 17 00:00:00 2001 From: xushubieli Date: Thu, 20 Oct 2022 17:42:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=AA=E9=9D=99=E6=80=81=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/admin/templets/catalog_add.htm | 14 +++++++++++--- src/admin/templets/catalog_edit.htm | 14 +++++++++++--- src/system/helpers/channelunit.helper.php | 9 ++------- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/admin/templets/catalog_add.htm b/src/admin/templets/catalog_add.htm index 1a23b244..07e543c8 100644 --- a/src/admin/templets/catalog_add.htm +++ b/src/admin/templets/catalog_add.htm @@ -433,8 +433,11 @@ {aid} 文章ID
{pinyin} 拼音+文章ID
{py} 拼音部首+文章ID
- {typedir} 栏目目录
- {cc} 日期+ID混编后用转换为适合的字母 + {typedir} 栏目目录
+ {cc} 日期+ID混编后用转换为适合的字母
+ Nginx伪静态默认规则
+ rewrite ^/([0-9]+).html$ /apps/view.php?arcID=$1;
+ rewrite ^/([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2; @@ -446,7 +449,12 @@ 支持变量: - {page} 列表的页码 + + {page} 列表的页码
+ Nginx伪静态默认规则
+ rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1;
+ rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&PageNo=$2; + 列表命名规则: diff --git a/src/admin/templets/catalog_edit.htm b/src/admin/templets/catalog_edit.htm index 56d6ed27..14ebfb81 100644 --- a/src/admin/templets/catalog_edit.htm +++ b/src/admin/templets/catalog_edit.htm @@ -373,8 +373,11 @@ {aid} 文章ID
{pinyin} 拼音+文章ID
{py} 拼音部首+文章ID
- {typedir} 栏目目录
- {cc} 日期+ID混编后用转换为适合的字母 + {typedir} 栏目目录
+ {cc} 日期+ID混编后用转换为适合的字母
+ Nginx伪静态默认规则
+ rewrite ^/([0-9]+).html$ /apps/view.php?arcID=$1;
+ rewrite ^/([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2; @@ -386,7 +389,12 @@ 支持变量: - {page} 列表的页码 + + {page} 列表的页码
+ Nginx伪静态默认规则
+ rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1;
+ rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&PageNo=$2; + 列表命名规则: diff --git a/src/system/helpers/channelunit.helper.php b/src/system/helpers/channelunit.helper.php index e9b3091d..446a48a9 100755 --- a/src/system/helpers/channelunit.helper.php +++ b/src/system/helpers/channelunit.helper.php @@ -145,9 +145,7 @@ if (!function_exists('GetFileName')) { $namerule = $cfg_special.'/{aid}.html'; $typeid = -1; } - //伪静态文档,Nginx伪静态规则参考: - //rewrite ^/([0-9]+).html$ /apps/view.php?arcID=$1; - //rewrite ^/([0-9]+)-([0-9]+).html$ /apps/view.php?aid=$1&pageno=$2; + //伪静态文档 if ($rank != 0 || $ismake == -1 || $typeid == 0 || $money > 0) { if ($cfg_rewrite == 'Y') { //目录版return "/article/".$aid.""; @@ -206,10 +204,7 @@ if (!function_exists('GetTypeUrl')) { global $cfg_typedir_df,$cfg_rewrite; $typedir = MfTypedir($typedir); $sitepath = MfTypedir($sitepath); - //伪静态栏目,Nginx伪静态规则参考: - //rewrite ^/list-([0-9]+)$ /apps/list.php?tid=$1; - //rewrite ^/list-([0-9]+)-([0-9]+)$ /apps/list.php?tid=$1&PageNo=$2; - + //伪静态栏目 if($isdefault==-1) { //动态 if ($cfg_rewrite == 'Y') {