📄 redirect.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
'========================================================================================
' 文 件 名: Redirect.asp
' 版 本: WapForum教程--判断WEB或WAP重新转向文件
' 说 明: 自动识别WEB或WAP文件 | 请勿删除此说明内容,转载请注明出处。多谢合作!
' 文件日期: 2007-03-14
' 讨论网站: WapForum.cn
'========================================================================================
' Copyright (C) 2007 WapForum.cn. All rights reserved.
' 网 站: http://WapForum.cn
' 电子邮件: Service@WapForum.cn
' 联系QQ: 13431619,44459416,82890065
' QQ交流群: 36508170
'========================================================================================
Dim strAccept
strAccept=LCase(Request.ServerVariables("HTTP_ACCEPT")) '//获取手机相关的一些特性信息
If Instr(strAccept,"wap")>0 then
Response.ContentType="text/vnd.wap.wml;charset=UTF-8" '将文件的格式转换成wml,编码为UTF-8
Response.Write ("<?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=""max-age=0""/>"&_
"<meta http-equiv=""Cache-Control"" content=""no-cache""/>"&_
"</head>"&_
"<card id=""Redirect"" title=""转向WAP页面..."">"&_
"<onevent type=""onenterforward""><go href=""wap/index.asp""></go></onevent>"&_
"<p align=""left"">"&_
"<a href=""wap/index.asp"">马上进入...</a>"&_
"</p></card></wml>"
'//注释=======================================
'//<onevent type=""onenterforward""><go href=""wap/index.asp""></go></onevent>是让页面进入时自动转向wap/index.asp
'//<a href=""wap/index.asp"">马上进入...</a>加上链接是防止一些手机无法自动跳转时可以点击链接进入
'=============================================
Else
Response.Redirect ("http://www.wapforum.cn/index.htm") '//转想WEB首页的URL
End If
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -