wappo
07-30-2003, 08:01 PM
Hello, i am creating a website at wappo.co.uk (http://www.wappo.co.uk) and i am also creating a wap site a the same address. I was given this piece of coding below to distinguish wheather the page was written in WML or HTML and i was told to include it into an ASP page. But i don't have a clue how to do this or what file extension to use please can you help me?
<%
h1 = Request.ServerVariables("HTTP_USER_AGENT")
h2 = Request.ServerVariables("HTTP_ACCEPT")
if Left(h1, 4) = "UP.B" or _
Left(h1, 4) = "Noki" or _
Left(h1, 4) = "Eric" or _
Instr(h2, "wml") <> 0 then
Response.Redirect "home.wml"
else
Response.Redirect "home.html"
end if
%>
<%
h1 = Request.ServerVariables("HTTP_USER_AGENT")
h2 = Request.ServerVariables("HTTP_ACCEPT")
if Left(h1, 4) = "UP.B" or _
Left(h1, 4) = "Noki" or _
Left(h1, 4) = "Eric" or _
Instr(h2, "wml") <> 0 then
Response.Redirect "home.wml"
else
Response.Redirect "home.html"
end if
%>