| From |
Phil |
| Posted |
3/25/2003 6:38:20 AM |
| Comments |
Hi,
I wonder if you are able to help me.
I just can't seem to find a solution to this redirection problem. I have tried many places but have been unsuccessfull. Perhaps you would know and can help.
I want to redirect the following to the correct browser version:
http://www.myyysite.com/test.asp?id=123
I have a browser detection page in the middle (using the Magicbeat server
behaviour 'detect browser and redirect') to Internet Explorer version
here:
http://www.myyysite.com/test_ie.asp?id=123
note the difference: _ie
I'd be obliged if someone could let me know how it is done, it's driving me nuts!
I'm using Dreamweaver MX.
Thanks.
Here's the redirection script I'm using:
<%
agent = Lcase(Request.ServerVariables("HTTP_USER_AGENT"))
nslash = InStr(1,agent,"/",1)
name = Left(agent, nslash -1)
vers = Right(agent, Len(agent) - nslash)
if InStr(1,name,"mozilla",1) > 0 Then
if InStr(1,agent,"spoofer",1) = 0 AND InStr(1,agent,"compatible") = 0 Then
name = "Netscape"
Else
If InStr(1,agent,"msie",1) > 0 Then
name = "Microsoft"
End If
End If
End If
if InStr(1,name,"Microsoft",1) > 0 AND CSng(Left(vers,3)) >= 4.0 Then
Response.Redirect("index_ie.asp")
Else
If InStr(1,name,"Netscape",1) > 0 AND CSng(Left(vers,3)) >= 4.0 Then
Response.Redirect("index_ns.asp")
Else
If InStr(1,name,"Netscape",1) > 0 AND CSng(Left(vers,3)) >= 3.0 Then
Response.Redirect("index_ns.asp")
Else
Response.Redirect("index_gen.asp")
End If
End If
End If
'MagicBeat Server Behavior - 1023 - by Jag S. Sidhu - www.magicbeat.com
%>
|
|