求教自动识别WAP与WEB并分别执行命令

来源:百度知道 编辑:UC知道 时间:2024/05/26 13:14:59
WAP访问时显示指定内容,WEB就转向指定的地址,哪位大侠帮帮我,谢拉

代码
如果你是用ASP语言的编写的请添加代码
<%
Response.Buffer = TRUE
httpAccept = LCase(Request.ServerVariables("HTTP_ACCEPT"))
if Instr(httpAccept,"wap") then
Response.Redirect "/wap/index.asp"
else
Response.Redirect "index.asp"
End if
%>
就行了