M
mettá
I have a small (but growing) mobile phone/pda site as an add on to the main
site.
I would like to filter visitors to help them find the mobile/pda bit (mostly
asp pages) and have used variations on the following
<%
'send user to main site
userAgent = Request.ServerVariables("HTTP_USER_AGENT")
userAgent = lcase(userAgent)
if Instr(userAgent, "mozilla") then
Response.redirect("../mainSite/page1.asp")
end if
%>
AND
<%
'keep main browsers here - move mobile users to mob
userAgent = Request.ServerVariables("HTTP_USER_AGENT")
userAgent = lcase(userAgent)
if Instr(userAgent, "mozilla") <= 0 then
if Instr(userAgent, "alcatel") then
Response.redirect("../mob/page1.asp")
elseif Instr(userAgent, "sonyericsson") then
Response.redirect("../mob/page2.asp")
End If
End If
%>
However "mozilla" is not the only main form of browser to send users back to
the main site and of course I have no idea about the main mini browsers,
i.e. Opera is both so how can I redirect OR give a message with an option
without it being global as a Click "Mobile or Main"
Any pointers or assistance very welcome
Thanks
M
site.
I would like to filter visitors to help them find the mobile/pda bit (mostly
asp pages) and have used variations on the following
<%
'send user to main site
userAgent = Request.ServerVariables("HTTP_USER_AGENT")
userAgent = lcase(userAgent)
if Instr(userAgent, "mozilla") then
Response.redirect("../mainSite/page1.asp")
end if
%>
AND
<%
'keep main browsers here - move mobile users to mob
userAgent = Request.ServerVariables("HTTP_USER_AGENT")
userAgent = lcase(userAgent)
if Instr(userAgent, "mozilla") <= 0 then
if Instr(userAgent, "alcatel") then
Response.redirect("../mob/page1.asp")
elseif Instr(userAgent, "sonyericsson") then
Response.redirect("../mob/page2.asp")
End If
End If
%>
However "mozilla" is not the only main form of browser to send users back to
the main site and of course I have no idea about the main mini browsers,
i.e. Opera is both so how can I redirect OR give a message with an option
without it being global as a Click "Mobile or Main"
Any pointers or assistance very welcome
Thanks
M