更新伪静态文章栏目规则,生成伪静态页面分页代码

This commit is contained in:
2020-05-26 15:15:32 +08:00
parent 4d658ca4ab
commit 8461f9230e
20 changed files with 287 additions and 122 deletions
+10 -9
View File
@@ -43,17 +43,11 @@ namespace COMCMS.Common
pageLink = url + "?" + strQueryString;
string currPage = MyHttpContext.Current.Request.Query["page"];
string id = MyHttpContext.Current.Request.Query["id"];
if (isRewrite == 5)
{
url = $"/{filepath}/index.html";
}
if (url == "memberdownloads.aspx" && isRewrite == 2)
{
string t = MyHttpContext.Current.Request.Query["t"];
if (string.IsNullOrEmpty(t) || !Utils.IsInt(t))
t = "1";
url = string.Format("memberdownloads-{0}.aspx", t);
}
switch (isRewrite)
{
@@ -71,8 +65,15 @@ namespace COMCMS.Common
pageLink = url.Replace(".", "-{0}.");
break;
case 3:
url = url.Replace(".aspx", ".html");//避免设置错之后出现问题
pageLink = url.Replace(".", "-{0}.");
if(url.EndsWith(".html") || url.EndsWith(".aspx"))
{
url = url.Replace(".aspx", ".html");//避免设置错之后出现问题
pageLink = url.Replace(".", "-{0}.");
}
else
{
pageLink = url + "?page={0}";
}
break;
case 5:
pageLink = url.Replace(".", "-{0}.");