[web] Creating a WAP subsite - how to redirect?
I'm creating a new website and I'd like there to be a WAP subsite for people to download my J2ME games to their phones "over the air".
My current method was (using ASP) to do a Response.Redirect if the browser string contained the text "Mozilla", as that's how I saw it done on a tutorial somewhere.
However, apparantly (and unsurprisingly) this method doesn't work with those odd bods who use Opera on Linux (I don't know if it affects anyone else, but I guess it does).
Is there a more robust method to do this? My new hosts support PHP/ASP, but I'm going to be using PHP now as my old ASP site used an Access database, and I cannot use that on my new hosting, and I know how to use PHP/MySQL and don't really want to try and use ASP/MySQL.
I found this on a forum somewhere... is that what you're after?
<? if(preg_match("/vnd.wap.wml/",$_SERVER['HTTP_ACCEPT'])){ header("Location: http://wap.mysite.com/"); exit; } ?>
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement