Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

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")
        else:

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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