急:请高手赐教,小妹谢谢大家。(asp伪静态页面问题)
小妹我做了一个显示文章内容的页面:content.asp网站主页index.asp每条信息打开后都对应有 http://127.0.0.1/content.asp?id=8001(说明:ID自动编号生成)
我现在想实现index.asp页面的每条信息,打开后,显示的不是http://127.0.0.1/content.asp?id=8001,而是http://127.0.0.1/content/8001.htm 这样的伪静态页面。
弄了很久没弄好,请高手帮忙啊
我的content.asp页面代码如下:
---------以下是content.asp页面的代码------
<%@ LANGUAGE = VBScript.Encode %>
<%owen=request("id")%>
<!--#include file="class/sub.asp" -->
<%
id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet")
sql="update news set hits=hits+1 where id="&id
conn.execute sql
sql="select * from news where id="&owen
rsnews.Open sql,conn,1,1
title=rsnews("title")
if rsnews.eof and rsnews.bof then
response.Write("数据库出错")
else
%>
<!--#include file="include/top.asp" -->
<SCRIPT language=javascript type=text/javascript>
<!--
document.oncontextmenu=new Function('event.returnValue=false;');
document.onselectstart=new Function('event.returnValue=false;');
-->
</SCRIPT><noscript><iframe src=*.html></iframe></noscript>
<div align="center">
<table width="990" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/content_top.gif" width="990" height="5" alt="" /></td>
</tr>
</table>
</div>
<div align="center">
<table width="990" height="500" border="0" cellpadding="0" cellspacing="0" background="images/content_bg.jpg" style="overflow:hidden">
<tr>
<td align="center" valign="top"><table width="100%" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" style="color:#000000; font-weight:bold; font-size:15px;"><%= rsnews("title") %></td>
</tr>
</table>
<table width="80%" height="1" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC"></td>
</tr>
</table>
<table style=" margin:5px;" width="88%" height="30" border="0" cellpadding="0" cellspacing="0" bgcolor="#F2F2F2">
<tr>
<td align="center" valign="middle"><span style="border-top: 1 solid #666666;border-bottom: 1 solid #666666"> 信息来源:<%= rsnews("user") %>
发布时间:<%= rsnews("AddDate") %> 阅读:<font color="#FF0000"><%= rsnews("hits") %></font>次
</span></td>
</tr>
</table>
<table width="88%" border="0" align="center" cellpadding="12" cellspacing="0">
<tr>
<td align="left" valign="top" style="line-height:19px;"><%=rsnews("content") %>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div></td>
</tr>
<tr>
<td align="left" valign="top" style="line-height:19px;"> <p align="center"><font color="#FF0000" size="2"><img src="images/diwen.jpg" width="795" height="5"></font></p>
<p align="center"><font color="#0000FF" size="2"><br />
</font></p>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="990" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/content_bottom.gif" width="990" height="5" alt="" /></td>
</tr>
</table>
<%
end if
rsnews.close
set rsnews=nothing
%>
<%
rs.close
set rs=nothing
call CloseConn()
%>
<!--#include file="include/bottom.asp" -->
</div>
</body>
</html>
---------content.asp页面代码结束------
急请高手赐教啊,小妹不胜感激。