Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 19th Jan 2011, 12:47 AM   #1
Web Marketing For Profit
War Room Member
 
Quentin's Avatar
 
Join Date: 2002
Location: Brisbane
Posts: 2,894
Thanks: 8
Thanked 1,160 Times in 528 Posts
Blog Entries: 10
Default
redirect from mobile to desktop
Share on: 
fb share twitter share gplus share more share

Hi

I am using a redirect script from my main site to my mobile site which is working ok however I would also like to add a script in my mobile site in case anyone finds it on their desktop.

Just using basic html

This is what I am using to go to the mobile site:

<script language=javascript>
<!--
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || ((navigator.userAgent.match(/iPad/i)))
{
location.replace("mobile.html");
}
-->
</script>

Thanks in advance

Quentin

Quentin is offline  
Unread 19th Jan 2011, 06:30 PM   #2
HyperActive Warrior
War Room Member
 
Join Date: 2005
Location: , , USA.
Posts: 410
Thanks: 0
Thanked 101 Times in 54 Posts
Blog Entries: 5
Default
Re: redirect from mobile to desktop
Share on: 
fb share twitter share gplus share more share

Check out:

The MobileESP Project: Easily detect mobile web site visitors

I don't know of a way to detect if it's a p.c. - and don't have time to dig it up. If you can't find a detection class you could just eliminate the popular phone Operating systems and redirect to the p.c. page if it's none of the above.

Look at the last example on that page I provided - it should make sense.
stma is offline  
Unread 19th Jan 2011, 06:31 PM   #3
HyperActive Warrior
War Room Member
 
Join Date: 2005
Location: , , USA.
Posts: 410
Thanks: 0
Thanked 101 Times in 54 Posts
Blog Entries: 5
Default
Re: redirect from mobile to desktop
Share on: 
fb share twitter share gplus share more share

direct link:

The MobileESP Project: Easily detect mobile web site visitors ยป How To: PHP Redirects
stma is offline  
Closed Thread


Bookmarks

Tags
desktop, mobile, redirect


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:36 PM.