Welcome to WebmasterWorld Guest from 54.205.60.49

Forum Moderators: bakedjake

Message Too Old, No Replies

Mobile web redirect- Safari won't work

mobile web

   
4:09 pm on Apr 26, 2007 (gmt 0)

5+ Year Member



Maybe someone knows how to do this or what is wrong. I am creating a web page which has ASP code to redirect the user if they are using a PPC or Mobile device. If they are, it redirects them to another page (mobile web site). That's working. Here's my problem. When I type the web address in Safari it's suppose to go to the normal web site and not to the mobile web site. Safari IS going to the mobile site. Is there a code I need to include so it doesn't redirect to the mobile site and just goes straight to the normal web page?
I tried adding
if Instr(userAgent, "mozilla") <= 0 then OR
if Instr(userAgent, "safari") <= 0 then

But that doesn't work.
Thank you.

12:55 am on Apr 28, 2007 (gmt 0)

10+ Year Member



Can you post all of your code? My gut is another part of the useragent string for safari is triggering one of the mobile redirects.

This is a typical safari useragent string:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en) AppleWebKit/XX (KHTML, like Gecko) Safari/YY

3:43 pm on May 2, 2007 (gmt 0)

5+ Year Member



You were right I had put PPC for Pocket PC redirect and the userAgent for Safari has PPC. So I changed my code to Windows CE and now it works.