Google App Engine Python Webapp2 301 redirect from www to non-www domain
I have an application built on gae. I use python with webapp2 framework. I need to make 301 redirect from www.my-crazy-domain.com to my-crazy.domain.com so to eliminate www and not-www doubles in search results. Does anybody have ready-to-use solution? Thanks for any help! I'v made the trick. class BaseController(webapp2.RequestHandler): """ Base controller, all contollers in my cms extends it """ def initialize(self, request, response): super(BaseController, self).initialize(request, response) if request.host_url != config.host_full: # get request params without domain url = request.url