Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8968315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:26:14+00:00 2026-06-15T17:26:14+00:00

I have recently changed domain name for a webapp I run on Google App

  • 0

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 application.

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 more elegant solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:26:15+00:00Added an answer on June 15, 2026 at 5:26 pm

    You could just do a global url rewrite. Basically, your webapp is already matching the requested URL and directing it to the appropriate code in the webapp2.WSGIApplication object, so you can simply have all URLs match to the same class, probably with ('/*', myclass) or something like that, and then have that page redirect users to the corresponding page of your new site. Example:

    import webapp2
    newdomain = 'http://www.mynewdomain.com/'
    
    class RedirectPage(webapp2.RequestHandler):
        def get(self, restofurl):
            return webapp2.redirect(newdomain + restofurl, permanent=True)
    
    app = webapp2.WSGIApplication([webapp2.Route(r'/<restofurl:.*>', handler=RedirectPage, name='redirect_page')])
    

    Unfortunately, I can’t currently test this to be 100% sure that it works, but I know it would work at least in theory. Ideally, I’d prefer an Apache URL rewrite, but I don’t think you have that option.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently changed my web app to create a database connection per command
I have a website http://rochesterwaterskishow.com which they've recently changed their name so they want
I recently changed my password and have to change my maven settings.xml file to
I was recently trying to re-install the fos:userbundle and noticed the docs have changed.
I have recently made changes in some code that makes a char name field
The site I was screen scraping (Which I have creds for) recently changed their
I have recently installed Reshaper....this is very good and helpful however it has changed
I have a WCF Service hosted on Windows Azure and I just recently changed
I have a form on an ASP.NET MVC site which I've recently changed from
We recently were forced to move to a new domain server half-way around the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.