What's the best way to get the top domain? We can do
url.substring(lastindexof('.')) though a reg ex seems preferrable.

2008/12/5 Jonk <[EMAIL PROTECTED]>

>
> On 5 joulu, 05:22, niklasr <[EMAIL PROTECTED]> wrote:
>
> > os.environ may achieve it
> >
> > import os
> > if os.environ.get('HTTP_HOST'):
> >     url = os.environ['HTTP_HOST']
> > else:
> >     url = os.environ['SERVER_NAME']
>
>
> I want to add that the full list of variables can be found in:
> http://hoohoo.ncsa.uiuc.edu/cgi/env.html
>
>
>    jK
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to