I deployed a website (it consists of one index.html page and folders that 
contain js, image & css files)  on the app-engine and linked it to my 
custom domain. I configured the CNAME and the site is opening on my domain, 
but the original appspot URL is not being redirected to the custom domain. 

I did come across pages with similar questions which discussed about this 
problem. I tried implementing those, but they didn't seem to work.

Here is what I did, in the **app.yaml** file I replaced:

    - url: /.*
      static_files: static
      upload: static


with

    - url: /.*
      script: main.application


and in the **main.py**, I erased all the content and added the following:


    import webapp2
    from google.appengine.ext.webapp.util import run_wsgi_app
    
    application = webapp2.WSGIApplication([
        webapp2.Route('/', webapp2.RedirectHandler, defaults={'_uri':
'http://subdomain.domain.com}),
    ], debug=False)
    
    def main():
        application.run()
    
    if __name__ == '__main__':
        main()



But it doesn't seem to work. The appspot URL is not being redirected but my 
custom domain is working alright. What changes should I make in the above 
code to make the redirection possible?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to