[web] Creating a WAP subsite - how to redirect?

Started by
1 comment, last by benryves 19 years, 8 months ago
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.

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

Advertisement
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; } ?> 
Quote:Original post by evolutional
I found this on a forum somewhere... is that what you're after?

*** Source Snippet Removed ***


That looks good; should do the trick [grin]
Thanks!

[Website] [+++ Divide By Cucumber Error. Please Reinstall Universe And Reboot +++]

This topic is closed to new replies.

Advertisement