Hi everybody, is there a way i can automactically redirect people visting my website using a mobile phone to a mobile version of my website? google and amazon can do it, and i use my mobile a lot to surf. so i wondering how i auto redirect without putting a 'click here mobile users' link on every page.
<? $htmlredirect = "Regular Web Page"; $wmlredirect = "Mobile Web Page"; if(strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.WML") > 0){ header("Location: ".$wmlredirect);} else{ header("Location: ".$htmlredirect); exit;} ?> That should work.
anywhere I usually put it towards the top. I tried to test it on my t-mobile dash but it wasnt working. It worked on my t619 though. If you have any future problems with wap, I use http://www.2wap.org/forums Quite resourceful
I have found that a lot of mobile redirecting scripts need to be updated constantly and always include Iphones in the redirecting process. If anyone is interested, I've uploaded a PHP script to the following website: Go to: http://www.pcmechanix.ca/mobile_redirect.htm If you would first like to test the code using a mobile device then input the following url into your mobile browser: http://www.pcmechanix.ca Good Luck!