002

ASP网页伪静态的实现

003

原理比较简单

http://www.goodtext.org/ article.asp?ID=86   替换成www.goodtext.org/ article.asp?/86.html。不需要通过iis+ISAPI_Rewrite做基于IIS的url rewrite

列表部分

以下为引用的内容:

Set rs=server.CreateObject("adodb.recordset")   
sql="select * from Article"  
rs.open sql,conn,1,1   
do while not rs.eof   
%>   
<li><a href="article.asp?/<%=rs("id")%>.html"><%=left(trim(rs("title")),35)%></a></li>    _fcksavedurl=""article.asp?/<%=rs("id")%>.html"><%=left(trim(rs("title")),35)%></a></li>   "
<%   
rs.movenext   
loop   

 ......

......

内页部分

以下为引用的内容:
......

id=request.QueryString("id")   
If id="" Then    
server_g10=Request.ServerVariables("QUERY_STRING")   
id=Int(replace(replace(server_g10,"/",""),".html",""))   
End If    

 ......

Tags:网站  网页  

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。