|
主题:共享文章系统用ISAPI_Rewrite伪静态时httpd.ini配置内容(本人已经伪静态成功) [收藏主题] | 转到: |
修改前请先备份所修改的文件! 共享文章系统用ISAPI_Rewrite伪静态时httpd.ini配置内容(本人已经伪静态成功) 彻底伪静态化!抛弃生成HTML文件时候的 长时间等待 和 系统资源的耗竭! ISAPI_Rewrite下载,含配置好的ini文件:
一下包括列表页、和内容页。不包括位置导航。 修改完毕请关闭文章系统的生成静态HTML页面功能。 形式体现: 【内容页】 未尽之处大家提出,我尽力而为。 [ISAPI_Rewrite] # 3600 = 1 hour RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files RewriteRule /Article/ShowInfo/(\d+)\.html /Article/ShowInfo\.asp\?id=$1 [N,I] RewriteRule /Article/ShowInfo/(\d+)-([0-9]+)\.html /Article/ShowInfo\.asp\?id=$1&Page=$2 [N,I] IIS中的设置大家应该都会吧?不会的看看截图吧!
[此贴子已经被作者于2007-7-30 10:39:05编辑过] |
|||
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
支持(0) | 反对(0) 顶端 底部 |
对于列表页中所有最终文章连接、翻页连接、位置导航。。。都要改。 太多了。都不记得该那些文件了。等整理好了再贴上来。 还有文章里如果有翻页也要改。。。 --------------------------------------------------------- 修改文件: 修改代码: GetFolderNaviStr = GetFolderNaviStr & NaviStr & "<a " & TitleCss & " href=""" & KSCMS.GetFolderPath(TSArr(I), True) & """" & KSCMS.GetOpenTypeStr(OpenType) & ">" & GetSubFolderName(TSArr(I)) & "</a>" 成为: GetFolderNaviStr = GetFolderNaviStr & NaviStr & "<a " & TitleCss & " href=""/Article/ShowClass/" & TSArr(I) & ".html""" & KSCMS.GetOpenTypeStr(OpenType) & ">" & GetSubFolderName(TSArr(I)) & "</a>" --------------------------------------------------------- 修改文件: 修改代码: ArticlePageStr = "<p><div align=center><a href=""?ID=" & ID & "&Page=" &(CurrPage + 1) & """>下一页</a><br>" ElseIf CurrPage = TotalPage Then ArticlePageStr = "<p><div align=center><a href=""?ID=" & ID & "&Page=" &(CurrPage - 1) & """>上一页</a><br>" Else ArticlePageStr = "<p><div align=center><a href=""?ID=" & ID & "&Page=" &(CurrPage - 1) & """>上一页</a> <a href=""?ID=" & ID & "&Page=" &(CurrPage + 1) & """>下一页</a><br>" End If ArticlePageStr = ArticlePageStr & "本文共<font color=red> " & TotalPage & " </font>页,第 " For N = 1 To TotalPage If CurrPage = N Then ArticlePageStr = ArticlePageStr & "<font color=red>[" & N & "]</font> " Else ArticlePageStr = ArticlePageStr & "<a href=""?ID=" & ID & "&Page=" & N & """>[" & N & "]</a> " End If 成为: ArticlePageStr = "<p><div align=center><a href=""" & ID & "-" &(CurrPage + 1) & ".html"">下一页</a><br>" ElseIf CurrPage = TotalPage Then ArticlePageStr = "<p><div align=center><a href=""" & ID & "-" &(CurrPage - 1) & ".html"">上一页</a><br>" Else ArticlePageStr = "<p><div align=center><a href=""" & ID & "-" &(CurrPage - 1) & ".html"">上一页</a> <a href=""" & ID & "-" &(CurrPage + 1) & ".html"">下一页</a><br>" End If ArticlePageStr = ArticlePageStr & "本文共<font color=red> " & TotalPage & " </font>页,第 " For N = 1 To TotalPage If CurrPage = N Then ArticlePageStr = ArticlePageStr & "<font color=red>[" & N & "]</font> " Else ArticlePageStr = ArticlePageStr & "<a href=""" & ID & "-" & N & ".html"">[" & N & "]</a> " End If ---------------------------------------------------- 修改文件: (搜索“动态显示分页”文字,之下代码,直到“删除刷新用的缓存数据”文字之上。两段文字中间的代码。) 修改原则: 所有“&Page=”改为“-”英文减号; 由于此段改的比较繁琐,所以我吧整个函数代码都贴上来了,懒得一个个该的就整个替换吧。 ============== 修改函数内代码: '动态显示分页 Function GetPageList(FileName,PageStyle,CurrPage,TotalPage, ShowTurnToFlag) Dim PageStr, I, J, SelectStr If ChkClng(PageStyle)=0 Then PageStyle=1 Select Case PageStyle Case 1 If CurrPage = 1 And CurrPage <> TotalPage Then PageStr = "首页 上一页 <a href=""" & FileName & "&Page=" & CurrPage + 1 & """>下一页</a> <a href= """ & FileName & "&Page=" & TotalPage & """>尾页</a>" ElseIf CurrPage = 1 And CurrPage = TotalPage Then PageStr = "首页 上一页 下一页 尾页" ElseIf CurrPage = TotalPage And CurrPage <> 2 Then '对于最后一页刚好是第二页的要做特殊处理 PageStr = "<a href=""" & FileName & """>首页</a> <a href=""" & FileName & "&Page=" & CurrPage - 1 & """>上一页</a> 下一页 尾页" ElseIf CurrPage = TotalPage And CurrPage = 2 Then PageStr = "<a href=""" & FileName & """>首页</a> <a href=""" & FileName & """>上一页</a> 下一页 尾页" ElseIf CurrPage = 2 Then PageStr = "<a href=""" & FileName & """>首页</a> <a href=""" & FileName & """>上一页</a> <a href=""" & FileName & "&Page=" & CurrPage + 1 & """>下一页</a> <a href= """ & FileName & "&Page=" &TotalPage & """>尾页</a>" Else PageStr = "<a href=""" & FileName & """>首页</a> <a href=""" & FileName & "&Page=" & CurrPage - 1 & """>上一页</a> <a href=""" & FileName & "&Page=" & CurrPage + 1 & """>下一页</a> <a href= """ & FileName & "&Page=" & TotalPage & """>尾页</a>" End If Case 2 If CurrPage=1 Then PageStr="<font face=webdings>9</font> <font face=webdings>7</font>" ElseIf CurrPage=2 Then PageStr="<a href=""" & FileName & """ title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & """ title=""上一页""><font face=webdings>7</font></a>" Else PageStr="<a href=""" & FileName & """ title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & "&Page="& CurrPage - 1 &""" title=""上一页""><font face=webdings>7</font></a> " End If For J=CurrPage To CurrPage+9 If J>TotalPage Then Exit For If J= CurrPage Then PageStr=PageStr & " <font color=red>[" & J &"]</font>" Else PageStr=PageStr & " <a href=""" & FileName & "&Page=" & J&""">[" & J &"]</a>" End If Next If CurrPage=TotalPage Then PageStr=PageStr & " <font face=webdings>8</font> <font face=webdings>:</font>" Else PageStr=PageStr & " <a href=""" & FileName & "&Page=" & CurrPage + 1 & """ title=""上一页""><font face=webdings>8</font></a> <a href=""" & FileName & "&Page=" & TotalPage & """><font face=webdings>:</font></a> " End If Case 3 If CurrPage=1 Then PageStr="<font face=webdings>9</font> <font face=webdings>7</font>" ElseIf CurrPage=2 Then PageStr="<a href=""" & FileName & """ title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & """ title=""上一页""><font face=webdings>7</font></a>" Else PageStr="<a href=""" & FileName & """ title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & "&Page="& CurrPage - 1 &""" title=""上一页""><font face=webdings>7</font></a> " End If If CurrPage=TotalPage Then PageStr=PageStr & " <font face=webdings>8</font> <font face=webdings>:</font>" Else PageStr=PageStr & " <a href=""" & FileName & "&Page=" & CurrPage + 1 & """ title=""上一页""><font face=webdings>8</font></a> <a href=""" & FileName & "&Page=" & TotalPage & """><font face=webdings>:</font></a> " End If End Select If CBool(ShowTurnToFlag) = True Then PageStr = PageStr & " 转到:<select name=""page"" size=""1"" onchange=""javascript:window.location=this.options[this.selectedIndex].value;"">" For J = 1 To TotalPage If J = CurrPage Then SelectStr = " selected" Else SelectStr = "" End If If J = 1 Then PageStr = PageStr & "<option value=""" & FileName & """" & SelectStr & ">第" & J & "页</option>" Else PageStr = PageStr & "<option value=""" & FileName & "&Page=" & J & """" & SelectStr & ">第" & J & "页</option>" End If Next PageStr = PageStr & "</select>" End If GetPageList=PageStr &"</div>" End Function 改为: '动态显示分页 Function GetPageList(FileName,PageStyle,CurrPage,TotalPage,ShowTurnToFlag) Dim PageStr, I, J, SelectStr If ChkClng(PageStyle)=0 Then PageStyle=1 Select Case PageStyle Case 1 If CurrPage = 1 And CurrPage <> TotalPage Then PageStr = "首页 上一页 <a href=""" & FileName & "-" & CurrPage + 1 & ".html"">下一页</a> <a href= """ & FileName & "-" & TotalPage & ".html"">尾页</a>" ElseIf CurrPage = 1 And CurrPage = TotalPage Then PageStr = "首页 上一页 下一页 尾页" ElseIf CurrPage = TotalPage And CurrPage <> 2 Then '对于最后一页刚好是第二页的要做特殊处理 PageStr = "<a href=""" & FileName & ".html"">首页</a> <a href=""" & FileName & "-" & CurrPage - 1 & ".html"">上一页</a> 下一页 尾页" ElseIf CurrPage = TotalPage And CurrPage = 2 Then PageStr = "<a href=""" & FileName & ".html"">首页</a> <a href=""" & FileName & ".html"">上一页</a> 下一页 尾页" ElseIf CurrPage = 2 Then PageStr = "<a href=""" & FileName & ".html"">首页</a> <a href=""" & FileName & ".html"">上一页</a> <a href=""" & FileName & "-" & CurrPage + 1 & ".html"">下一页</a> <a href= """ & FileName & "-" &TotalPage & ".html"">尾页</a>" Else PageStr = "<a href=""" & FileName & ".html"">首页</a> <a href=""" & FileName & "-" & CurrPage - 1 & ".html"">上一页</a> <a href=""" & FileName & "-" & CurrPage + 1 & ".html"">下一页</a> <a href= """ & FileName & "-" & TotalPage & ".html"">尾页</a>" End If Case 2 If CurrPage=1 Then PageStr="<font face=webdings>9</font> <font face=webdings>7</font>" ElseIf CurrPage=2 Then PageStr="<a href=""" & FileName & ".html"" title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & ".html"" title=""上一页""><font face=webdings>7</font></a>" Else PageStr="<a href=""" & FileName & ".html"" title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & "-"& CurrPage - 1 &".html"" title=""上一页""><font face=webdings>7</font></a> " End If For J=CurrPage To CurrPage+9 If J>TotalPage Then Exit For If J= CurrPage Then PageStr=PageStr & " <font color=red>[" & J &"]</font>" Else PageStr=PageStr & " <a href=""" & FileName & "-" & J & ".html"">[" & J &"]</a>" End If Next If CurrPage=TotalPage Then PageStr=PageStr & " <font face=webdings>8</font> <font face=webdings>:</font>" Else PageStr=PageStr & " <a href=""" & FileName & "-" & CurrPage + 1 & ".html"" title=""上一页""><font face=webdings>8</font></a> <a href=""" & FileName & "-" & TotalPage & ".html""><font face=webdings>:</font></a> " End If Case 3 If CurrPage=1 Then PageStr="<font face=webdings>9</font> <font face=webdings>7</font>" ElseIf CurrPage=2 Then PageStr="<a href=""" & FileName & """ title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & ".html"" title=""上一页""><font face=webdings>7</font></a>" Else PageStr="<a href=""" & FileName & """ title=""首页""><font face=webdings>9</font></a> <a href=""" & FileName & "-"& CurrPage - 1 &".html"" title=""上一页""><font face=webdings>7</font></a> " End If If CurrPage=TotalPage Then PageStr=PageStr & " <font face=webdings>8</font> <font face=webdings>:</font>" Else PageStr=PageStr & " <a href=""" & FileName & "-" & CurrPage + 1 & ".html"" title=""上一页""><font face=webdings>8</font></a> <a href=""" & FileName & "-" & TotalPage & ".html""><font face=webdings>:</font></a> " End If End Select If CBool(ShowTurnToFlag) = True Then PageStr = PageStr & " 转到:<select name=""page"" size=""1"" onchange=""javascript:window.location=this.options[this.selectedIndex].value;"">" For J = 1 To TotalPage If J = CurrPage Then SelectStr = " selected" Else SelectStr = "" End If If J = 1 Then PageStr = PageStr & "<option value=""" & FileName & ".html""" & SelectStr & ">第" & J & "页</option>" Else PageStr = PageStr & "<option value=""" & FileName & "-" & J & ".html""" & SelectStr & ">第" & J & "页</option>" End If Next PageStr = PageStr & "</select>" End If GetPageList=PageStr &"</div>" End Function ==============
============================================== 修改完毕的文件打包下载:
============================================== ---- [此贴子已经被作者于2007-7-30 10:33:02编辑过] |
|||
支持(0) | 反对(0) 顶端 底部 |
<上一主题 | 下一主题 > |