inside regular page (redirect to your iphone page ): 

<!DOCTYPEHTMLPUBLIC"-//W3C//DTD HTML 
4.01//EN""http://www.w3.org/TR/html4/strict.dtd";>
<html>
<head>
<script>
if((navigator.userAgent.indexOf('iPhone') != -1) || 
(navigator.userAgent.indexOf('iPod') != -1 )) {
window.location.href="http://eastsideinteractive.com/iphone/";;
}
</script>
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8">








inside iphone page (if they try to access it from browser to redirect them to 
the normal web page): 




<!DOCTYPEHTMLPUBLIC"-//W3C//DTD HTML 
4.01//EN""http://www.w3.org/TR/html4/strict.dtd";>
<html>
<head>
<script>
if((navigator.userAgent.indexOf('iPhone') != -1) || 
(navigator.userAgent.indexOf('iPod') != -1 )) {
//do nothing inside iphone/ipod
} else {
window.location.href="http://eastsideinteractive.com/";;
}
</script>
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8">




substitute the URLs with your links/folders etc. 

 
Hope it helps...

Marijan





----- Original Message ----
From: RobG <[email protected]>
To: iPhoneWebDev <[email protected]>
Sent: Sun, December 19, 2010 6:14:44 PM
Subject: Re: Detecting Mobile Safari



On Dec 17, 5:18 am, "post.72" <[email protected]> wrote:
> This is my first post to the group:)
>
> I'm working on a company's ASP website.  It has a ton of flash
> elements that obviously don't work with iPhone/iPad.  I created
> several mobile safari compatible links for the site.  I need a
> javascript that will detect mobile safari on the site's index page,
> then redirect to the new mobile safari "friendly index page".  This is
> the script I've tried but it doesn't seem to work:

Put a button on the site with "Flash-free version here:". You might be
surprised how many visitors with Flash-capable browsers click the
button. ;-)


--
Rob

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to