Jump to content
  • Advertisement
Sign in to follow this  
benryves

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

This topic is 5109 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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;
}
?>


Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!