[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread 风笑雪
Sorry
class Handler(webapp.RequestHandler):
  def get(self):
self.set_status(301)
self.redirect(http://www.example.com;) # this is what you want to
redirect to

2009/4/18 风笑雪 kea...@gmail.com

 class Handler(webapp.RequestHandler):
   def get(self):
 self.set_status(301)
 self.redirect(/home)

 and make Handler class to handle your url.

 2009/4/18 richardcur...@googlemail.com richardcur...@googlemail.com


 Hi,

 how do I somehow 'redirect' all calls to appengine url to my Google
 Apps url?

 Something like: (Status-Line)   HTTP/1.1 301 Moved Permanently



 if somebody calls:

 http://example.appspot.com I want it to be redirected to

 http://www.example.com


 similarily if somebody calls

 http://example.appspot.com/data/34354/fractal

 I want the browser of the user show http://example.com/data/34354/fractal
 



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread ctran

Try this:

  
http://appengine-cookbook.appspot.com/recipe/redirect-from-appspot-to-your-domain

On Apr 18, 9:18 am, richardcur...@googlemail.com
richardcur...@googlemail.com wrote:
 I know in principle how to redirect.

 The point is, all appengine python handler classes are identical for
 both

 http://example.appspot.comandhttp://www.example.com

 So I had to check in EVERY python handler class - is the call coming
 from example.appspot.com - if yes redirect towww.example.com. This is
 madness.

 The question is how to globally set for all my python classes to
 redirect this call.

 - Ricky
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread 风笑雪
Good article, thanks~

2009/4/18 ctran ct...@pragmaquest.com


 Try this:


 http://appengine-cookbook.appspot.com/recipe/redirect-from-appspot-to-your-domain

 On Apr 18, 9:18 am, richardcur...@googlemail.com
 richardcur...@googlemail.com wrote:
  I know in principle how to redirect.
 
  The point is, all appengine python handler classes are identical for
  both
 
  http://example.appspot.comandhttp://www.example.com
 
  So I had to check in EVERY python handler class - is the call coming
  from example.appspot.com - if yes redirect towww.example.com. This is
  madness.
 
  The question is how to globally set for all my python classes to
  redirect this call.
 
  - Ricky
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread richardcur...@googlemail.com

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Redirect all calls to appengine url to my Google Apps url

2009-04-18 Thread richardcur...@googlemail.com

I tried it. But when I call my appspot url now directly I get a
webpage:

Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this
error message and the query that caused it.


My main domain works - except the calls to the appspot domain. I
cannot use it this way :(


On Apr 18, 4:48 pm, ctran ct...@pragmaquest.com wrote:
 Try this:

  http://appengine-cookbook.appspot.com/recipe/redirect-from-appspot-to...

 On Apr 18, 9:18 am, richardcur...@googlemail.com

 richardcur...@googlemail.com wrote:
  I know in principle how to redirect.

  The point is, all appengine python handler classes are identical for
  both

 http://example.appspot.comandhttp://www.example.com

  So I had to check in EVERY python handler class - is the call coming
  from example.appspot.com - if yes redirect towww.example.com. This is
  madness.

  The question is how to globally set for all my python classes to
  redirect this call.

  - Ricky
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---