Can someone give me a basic rundown of how to set up a mobile site on app engine. I already have a standard site set up but I want to use the same data store to run a mobile site.
I would like to redirect mobile users to m.mydomain.com. Basically both sites will be the same I just want to show them 开发者_StackOverflow社区different jsp pages.
There's nothing specific to App Engine here. All you need to do is detect the appropriate user-agents and send a redirect if you detect a mobile one. Then, map the mobile domain to your same application, and detect it in your configuration when determining what template to serve.
From a usability point of view, though, there's no need to direct users to a different subdomain - just serve the mobile version off the current domain. You should also always provide a way for users to override your autodetection and switch between mobile and regular versions, because it's impossible to keep up with every device out there.
精彩评论