homepage Welcome to WebmasterWorld Guest from 54.227.34.0
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
Forum Library, Charter, Moderators: bakedjake

Smartphone, Wireless, and Mobile Technologies Forum

    
Mobile web redirect- Safari won't work
mobile web
sscoder

5+ Year Member



 
Msg#: 3322597 posted 4:09 pm on Apr 26, 2007 (gmt 0)

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.

 

stajer

10+ Year Member



 
Msg#: 3322597 posted 12:55 am on Apr 28, 2007 (gmt 0)

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

sscoder

5+ Year Member



 
Msg#: 3322597 posted 3:43 pm on May 2, 2007 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Smartphone, Wireless, and Mobile Technologies
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved