【发布时间】:2014-10-03 21:25:12
【问题描述】:
我想让一个子域指向我在应用引擎中的自定义域中的特定 url,就像这样:
sub.domain.com => domain.com/sub
我在我的代码中使用 DomainRoute 并在生产中发布,但是没有用
application = webapp2.WSGIApplication([
routes.DomainRoute('mySub.domain.com', [
webapp2.Route('/mobile', handler=ConoceMas, name='mobile-landing'),
]),
('/', MainPage),
('/(es|en|fr|de)', MainPage),
('/sendcomments', SendComments),
('/subscribe', Subscribe),
('/mobile', ConoceMas)
当我把任何子域转到主页时。
这段代码有什么问题?又如何在localhost环境下证明呢?
PS。 在域掩码中,我将 * CNAME 配置(在 godaddy admin 中)
【问题讨论】:
标签: python google-app-engine webapp2