我将我的应用程序部署到主域www.mysite的GAE上。当有人订阅我的应用程序时,他将使用电子邮件ID username@company。
我想从电子邮件ID捕获公司,并将url设置为公司.mysite将映射到www.mysite。我认为这可以通过在域名注册商cpanel上使用*通配符CNAME来完成。但是,按照线程如何设置动态子域跨服务器或在DNS设置我们不能设置与GAE的通配域。
所以,我的问题是我应该如何编程从电子邮件ID这样做我不必为每家公司手动设置子域名?我可以在GAE上使用通配符子域吗?或者我需要对AWS的route53进行一些研究?
让我知道是否缺少任何信息。任何帮助将不胜感激。
更新:对于您的信息,我已经从godaddy注册了我的域名。
/ li>就是这样。您必须稍等一点才能正确传播DNS设置,但现在 wildcard.mysite 应该指向您的应用。
注意
这将允许任何通配符指向您的应用。请参阅上面链接的自定义域设置流程页面中更多关于通配符子域映射的说明。您可以通过处理应用中的值并为您不想承认的子域返回404错误或类似内容来限制应用中的允许子域(在您的用例中,任何非公司名称的值已注册申请的用户)
I am having my application deployed to GAE with main domain www.mysite. When someone subscribe to my application, he will use email id username@company.
I want to capture the company from the email id, and set the url as company.mysite that will map to www.mysite. I think this can be done by using * wildcard CNAME on domain registrar cpanel. But, as per thread How to set dynamic subdomain cross server or in DNS setting we can't set wildcard domain with GAE.
So, my question is how should I do it programatically from email id so I don't have to manually set sub-domain for each company ? Can I use wildcard sub-domain on GAE or I need to do some research on route53 of AWS ?
Let me know if I am missing any info. Any help will be appreciated.
UPDATE: For your info, I have registered my domain from godaddy.
解决方案Instructions
That's just about it. You'll have to wait a bit for the DNS settings to properly propagate, but now wildcard.mysite should point to your app.
NOTE
This will allow ANY wildcard to point towards your app. See the notes under More About Wildcard Subdomain Mapping in the Custom Domain Setup Process page linked above. You can limit what subdomains are "allowed" in your app by processing the value in your app and returning 404 errors or the like for subdomains you do not want to acknowledge (in your use case, any value that is not a company name of a user who has signed up for your application)
更多推荐
以编程方式在Google应用引擎上设置子域名
发布评论