ASP伪静态代码
直接用代码 模拟:
在某个根目录创建个 index.asp
原理是用 Request.ServerVariables("QUERY_STRING") 获取参数替换
this page :index.asp
asp code:
id = LCase(Trim(Request.ServerVariables("QUERY_STRING")))
response.write (id )
<%
dim s
' s=request("")
dim id
id = LCase(Trim(Request.ServerVariables("QUERY_STRING")))
response.write (id )
%>
sample:test.asp?/1234.html
server_v40=Request.ServerVariables("QUERY_STRING")
id=Int(replace(replace(server_v40,"/",""),".html",""))
----------------
then asp result:
<%
server_v40=Request.ServerVariables("QUERY_STRING")
id=Int(replace(replace(server_v40,"/",""),".html",""))
response.write("test.asp?id="& id )
%>
在浏览器输入:http://localhost:1390/artlist/?554448.html
输出:
this page :index.asp
asp code: id = LCase(Trim(Request.ServerVariables("QUERY_STRING")))
response.write (id )
554448.html
sample:test.asp?/1234.html
server_v40=Request.ServerVariables("QUERY_STRING")
id=Int(replace(replace(server_v40,"/",""),".html",""))
then asp result:
test.asp?id=554448
fffffffffffffffff
test red font.