Jump to content


Photo

please help... need mobile redirect


  • Please log in to reply
1 reply to this topic

#1 jessica@bluelaserdesign.com

jessica@bluelaserdesign.com
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 13 April 2006 - 06:18 PM

I am really new to this... I am tryin to figure out how to redirect someone that comes to my website from a mobile device to a different page that is opitmized for mobiles. I can't figure out how to make it work. Please help

#2 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 13 April 2006 - 07:37 PM

hmm.. I'm guessing that the $_SERVER['HTTP_USER_AGENT'] should contain a clue as to who is hitting your site. I wish I knew which keywords you could search for -- check your logs for the mobile browsers.

for the sake of discussion, we'll say all of the browsers have the word "mobile" in them.

<? if(strpos(strtolower($_SERVER['HTTP_USER_AGENT']),"mobile") header("Location: mobilepage.html");?>

hope that helps.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users