I have recently changed domain name for a webapp I run on Google App Engine and I am wondering if there is a simple way to do a page for page redirect from my old website to the new domain. Everything code wise is staying exactly the same but I just want it to go to the new domain.

I am using Python and the webapp2 framework for the web app.

I know I could go through and for every single handler do:

webapp2.redirect('the specific url', permanent=True)

but I am hoping for a simpler solution.

1 Answer 1


You should be able to do this on a global scale using webapp.RequestHandlers

class FormHandler(webapp.RequestHandler):
    def post(self):
        if processFormData(self.request):
            self.redirect("the specific url")

Also this your find more support on stack overflow since this is python based coding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.