If you are using windows you should only need to edit your hosts file at C:\Windows\System32\drivers\etc. Add 2 mappings to the file: m.domain.com localhost:8080 www.domain.com localhost:8080
I have never tried this with appengine, however this is how I worked with other environments when I needed url mapping to my local dev environments. On Sat, Dec 5, 2009 at 8:06 PM, djennings <[email protected]> wrote: > I have tried mapping to both domains (www. & m.) on my local dev > server but unable to do so. Did you use a local dev server when doing > this app? Do you have to edit the SDK files to do this? Do you just > use "www.localhost:8080" and "m.localhost:8080" ? > > This below link helped me out with mapping my domains on appengine but > I haven't been able to test the domains locally yet because I don't > know what to use as the domain placeholder while mapping the domains > through the local appserver. > > > http://stackoverflow.com/questions/838078/working-with-subdomain-in-google-app-engine > > applications = { > 'www.localhost:8080': webapp.WSGIApplication([ > ('/', IndexHandler)]), > 'm.localhost:8080': webapp.WSGIApplication([ > ('/', IndexHandler)]), > } > > def main(): > run_wsgi_app(applications[os.environ['HTTP_HOST']]) > > if __name__ == '__main__': > main() > > On Dec 4, 3:47 pm, Robert Kluin <[email protected]> wrote: > > You can map both domains to your app. Then within your application you > can > > detect to domain and take the appropriate action. In other words, the > same > > application will handle both domains -- your code will handle routing the > > request to the proper handler. > > > > Robert > > > > > > > > On Fri, Dec 4, 2009 at 4:42 PM, djennings <[email protected]> wrote: > > > If I had two separate applications under the same google apps domain > > > (m.domain andwww.domain.com), could these two applications share a > > > common database/datastore since it's the same developer (both in > > > python) under the same google apps domain? > > > > > On Dec 4, 12:33 pm, Ray Malone <[email protected]> wrote: > > > > Under the setting for the app in your domain manager you should be > > > > able to add a another sub domain to point to the same app. Then you > > > > will need to update your records from the company you registered with > > > > to point the sub domain to ghs.google.com. I do this with several > of > > > > my apps. However, you will need to detect the domain to determine > > > > which one is which. > > > > > > On Dec 3, 8:38 pm, djennings <[email protected]> wrote: > > > > > > > I created a website (including blog) along with a mobile edition > using > > > > > python. The website, blog and mobile edition will eventually be > under > > > > > a Google Apps/Engine domain. The main app will be hosted > > > atwww.domain.com > > > > > and the mobile edition atwww.domain.com/mobile/, and this works > just > > > > > fine on the local dev appserver right now. > > > > > > > But I would prefer to have the mobile edition app at "m.domain.com > " > > > > > instead of "www.domain.com/mobile/". How could this work with two > > > > > separate sub domain apps written both in python under the same > google > > > > > apps domain? > > > > > -- > > > > > You received this message because you are subscribed to the Google > Groups > > > "Google App Engine" group. > > > To post to this group, send email to [email protected] > . > > > To unsubscribe from this group, send email to > > > [email protected]<google-appengine%[email protected]><google-appengine%2Bunsubscrib > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > -- > > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
