- This topic has 1 reply, 2 voices, and was last updated 13 years, 4 months ago by support-michael.
-
AuthorPosts
-
flexartParticipantI am looking for a way to redirect the iphone site to the normal site without using duplicated index pages.
I have a link in the phone site that need to bring you to the normal site. Any idea how i can do this without going back to the phone version?
I am using this code to redirect mobile users to phone version and that is all working fine. I will give them the option to go to the normal site.<script>
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))) {
if (document.cookie.indexOf(“iphone_redirect=false”) == -1) window.location = “http://www.yourdomain/phone/index.html”;
}
</script>
support-michaelKeymasterThis is a good question that I am learning about. For example genuitec has a simple mobile site built with an older version of MobiOne. When you use the iPhone mobile safari to access genuitec.com it redirects to the virtual domain: m.genuitec.com which host the genuitec mobile site. On the contact page of the mobile site there is a link that opens the main genuitec.com site.
The way we implemented this is to use our Apache web server’s URL rewrite capabilities. See these article for How-To configure apache:
http://www.ferdianto.com/2009/05/13/using-apache-and-modrewrite-to-redirect-your-mobile-user
http://webdirect.no/mobile/apache-rewrite-rule-for-iphone-users/
http://ohryan.ca/blog/2009/02/18/revisiting-mobile-redirection-using-htaccess-rewrite-rules/
If you need to implement the device context and navigation directly in the app I can try to help investigate this further but it seems like the hard way to solve this problem.
-
AuthorPosts