Brilliant! Thanks for the quick response, I'll give that a go.
Cheers Ric On Aug 12, 2:40 pm, Anand Chitipothu <anandol...@gmail.com> wrote: > 2011/8/12 Richard Harvey <rich...@squarecows.com>: > > > Hi guys, > > > This may have been asked before but I can't seem to find a reference > > to it. I'm running the skeleton code at the moment and have this: > > > urls = ( > > '/', 'index' > > ) > > > Which if i understand correctly calls the index class when a GET is > > called on / > > > however is it possible to modify the code so that a GET on / when > > using the URLhttp://example.com/calls a different page to if you > > access the same IP but viahttp://anothersite.com/ > > You can use web.ctx.site to find that. > > One way is to use an if condition in your index class. > > Another way is to create 2 different applications and combine them > using subdomain_application. > > mapping = ( > "blog.example.com", blog_app, > ".*", default_app > ) > app = web.subdomain_application(mapping) > > Anand -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to webpy@googlegroups.com. To unsubscribe from this group, send email to webpy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.