将域(不是谷歌应用程序)重定向到appengine

发布于 2024-08-29 01:35:50 字数 238 浏览 0 评论 0原文

我正在构建一个支持不同域的应用程序。一个支持不同域的小型CMS。

但我不知道如何重定向谷歌应用程序之外的其他域。我在 google apps 上有一个域名,运行得很好。 当我创建一个指向我的 appid.appspot.com 或 www.appsdomain.com 的 cname 时,它​​只会转到 google.com。

我需要做什么才能让其他域指向我的 appengine 应用程序。

..弗雷德里克

I'm building a application that supports different domains. A small CMS that supports different domains.

But what I can't figure out is how to redirect other domains that's outside google apps. I have a domain at google apps, that work's perfectly.
When I create a cname that points at either my appid.appspot.com or www.appsdomain.com it just goes to google.com.

What do I need to do so the other domains point to my appengine application.

..fredrik

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

小清晰的声音 2024-09-05 01:35:50

您不能只使用 cname,因为谷歌需要知道如何通过其基础设施将请求定向到您的应用程序。

您应该按照此处的说明进行操作:http://code.google.com/appengine/docs /domain.html 使用其基础设施设置您的名称,以便正确路由对 cname 的请求。

更新:您不必将您的域名移至 google,只需告知他们您要设置 cname 来指向他们的名称即可。

You can't just use a cname because google needs to know how to direct the requests through their infrastructure to your app.

You should follow the instructions here: http://code.google.com/appengine/docs/domain.html to set up your name with their infrastructure so that requests to the cname get routed correctly.

Update: You do not have to move your domain to google, only inform them of the names you are going to set up cnames to point to them.

贪了杯 2024-09-05 01:35:50

您无需 cname 即可做到这一点。

您需要为您的第二个域名设置重定向机制。您可以通过告诉您的注册商将该网址重定向到您的 Google Apps 网址(这就是我对我的注册商的做法, name.com),或者您可以在您管理的服务器上设置一个小型 [php] 脚本,该脚本将接收第二个域上的查询并向您的 Google Apps 域发出 301 重定向。

编辑:这完全取决于你想做什么。如果您希望您的应用程序同时存在于两个 URL 中,则此解决方案将不起作用。我写这篇文章的想法是,您希望第二个网址重定向到您的主网址,如果这不是您想要做的,那么发出重定向将无法解决问题。

You can do that without a cname.

You need to set up a redirection mechanism of your second domain name. You can do that either by telling your registrar to redirect that url to your Google Apps url (that's how I do it with my registrar, name.com), or you could set up a small [php] script on a server you manage that would receive the queries on the second domain and issue a 301 redirect to your Google Apps domain.

EDIT: It all depends on what you want to do. If you want your app to live at both urls, then this solution will not work. I wrote this in the idea that you want the second url to redirect to your main url, if that's not what you want to do, then issuing redirects won't do the trick.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文