谁帮我改改web和wap网站页面转调代码
这个转调代码是用来识别手机站和电脑站的,但是手机使用cmnet接入点的时候就被识别为web去了,cmwap接入点能正常转跳到手机wap站,:听别人说这个是识别UA,我也搞...
这个转调代码是用来识别手机站和电脑站的,但是手机使用cmnet接入点的时候就被识别为web去了,cmwap接入点能正常转跳到手机wap站,: 听别人说这个是识别UA,我也搞不懂啦 但是我看见有的能正常识别 麻烦各位帮我改改吧 谢谢 <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<%
Function CheckBrowser()
Dim sAgent
sAgent = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(sAgent, "MSIE") > 0 AND InStr(sAgent, "mac") <= 0 AND InStr(sAgent, "Opera") <= 0 Then
CheckBrowser = True
ElseIf InStr(sAgent, "Gecko") > 0 Then
CheckBrowser = True
ElseIf InStr(sAgent, "Opera") > 0 Then
CheckBrowser = False
ElseIf InStr(sAgent, "AppleWebKit") > 0 Then
CheckBrowser = True
Else
CheckBrowser = False
End If
End Function
IF Cbool(CheckBrowser)=False Then
%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="no-Cache"/>
<meta http-equiv="Cache-Control" content="max-age=0"/>
</head>
<card id="main" title="">
<p>
<%
Response.redirect "wap/index.asp"
%>
</p>
</card>
</wml>
<%Else%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title></title>
</head>
<body>
<%
Response.redirect "web.asp"
%>
</body>
</html>
<%End If%> 展开
<%
Function CheckBrowser()
Dim sAgent
sAgent = Request.ServerVariables("HTTP_USER_AGENT")
If InStr(sAgent, "MSIE") > 0 AND InStr(sAgent, "mac") <= 0 AND InStr(sAgent, "Opera") <= 0 Then
CheckBrowser = True
ElseIf InStr(sAgent, "Gecko") > 0 Then
CheckBrowser = True
ElseIf InStr(sAgent, "Opera") > 0 Then
CheckBrowser = False
ElseIf InStr(sAgent, "AppleWebKit") > 0 Then
CheckBrowser = True
Else
CheckBrowser = False
End If
End Function
IF Cbool(CheckBrowser)=False Then
%>
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="no-Cache"/>
<meta http-equiv="Cache-Control" content="max-age=0"/>
</head>
<card id="main" title="">
<p>
<%
Response.redirect "wap/index.asp"
%>
</p>
</card>
</wml>
<%Else%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title></title>
</head>
<body>
<%
Response.redirect "web.asp"
%>
</body>
</html>
<%End If%> 展开
展开全部
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001" %>
<%
Dim sAgent
sAgent = Request.ServerVariables("HTTP_USER_AGENT")
tempage = split("Windows NT|Windows 98|Windows ME|http://|HaoDew","|")
for k = 0 to ubound(tempage)
if instr(sAgent,tempage(k))>0 then response.redirect "web.asp"
next
Response.redirect "wap/index.asp"
%>
<%
Dim sAgent
sAgent = Request.ServerVariables("HTTP_USER_AGENT")
tempage = split("Windows NT|Windows 98|Windows ME|http://|HaoDew","|")
for k = 0 to ubound(tempage)
if instr(sAgent,tempage(k))>0 then response.redirect "web.asp"
next
Response.redirect "wap/index.asp"
%>
万企明道
2024-08-07 广告
2024-08-07 广告
开源低代码开发平台,作为现代软件开发的新兴力量,为上海万企明道软件有限公司等企业提供了一种高效、灵活的软件构建方式。这类平台通过图形化界面和预置的组件库,显著降低了编程门槛,加速了应用开发周期。它们鼓励技术创新与共享,让非专业开发者也能快速...
点击进入详情页
本回答由万企明道提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询