如何在 Google App Engine 上设置我的域名?
我制作了一个可以在 App Engine 上运行的网站,并已部署它。 我已将我的域名重定向到 ghs.google.com,它成功访问了我的网站。
问题是,在地址栏中,“www.mysite.com”变成了“myappid.appspot.com”,而我不知道如何让它保留在“www.mysite.com”中。
这看起来是一件很简单的事情,但它开始让我发疯!
我该如何解决?
I've made a website to go on App Engine, and have deployed it.
I've redirected my domain name to ghs.google.com, and it successfully goes to my site.
The problem is that in the address bar, 'www.mysite.com' turns into 'myappid.appspot.com', and I haven't got a clue as to how I make it stay with 'www.mysite.com'.
It seems like such a simple thing, but It's starting to drive me insane!
How do I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
看看这份快速指南,本质上是:
Have a look at this quick guide, in essence:
关于裸域问题。 请查看:http://code.google.com/appengine/ kb/general.html#naked_domain 并点击那里提供的链接。
With respect to the naked domain question. Please take a look at: http://code.google.com/appengine/kb/general.html#naked_domain and follow the link provided there.
您获得所描述的行为的唯一原因是您的应用程序是否发出从 www.mysite.com 到 mysite.appspot.com 的 301 或 302 重定向。 App Engine 本身不会执行此操作。 如果您粘贴相关的处理程序代码,也许我们可以发现问题。
The only reason you'd get the behaviour you're describing is if your app is issuing a 301 or 302 redirect from www.mysite.com to mysite.appspot.com. App Engine won't do this itself. If you paste the relevant handler code, perhaps we can spot the issue.
我发现我的域名提供商允许我从 http://mysite.com 进行 URL 重定向到另一个 URL,但不幸的是,它不允许我将 http://mysite.com 重定向到 http://www.mysite.com。
但我发现它会让我重定向到 http://www.mysite.com/home ,所以我已经这样做了。 从 www.mysite.com/home,我可以重定向到 www.mysite.com,但我并不那么挑剔:)
我认为在我最初的问题中,我的浏览器可能已经缓存了一些东西,所以当我正在玩它没有正确响应。 第二次重置我的历史记录或按 ctrl+F5 有所帮助。
第一个答案提供了关于谷歌应用程序方面的非常好的说明,但是提供的链接确实让我对在 dyndns.com 上设置内容的说明感到困惑(这对我来说真的很奇怪)。 我只需要接触谷歌应用程序和我的域名提供商。
Google 也有一些文档,我发现 http ://www.google.com/support/a/bin/answer.py?hl=zh-CN&answer=61057
感谢大家的帮助:)
I found that my domain name provider allowed me to do a URL redirect from http://mysite.com to another url, but unfortunately it didn't let me redirect http://mysite.com to http://www.mysite.com.
I found that it would however let me redirect to http://www.mysite.com/home though, so I've done that. From www.mysite.com/home, I could have done a redirect to www.mysite.com, but I'm not that fussy :)
I think that in my original question, my browser might have been caching things, so when I was playing around it wasn't responding properly. A reset of my history or a ctrl+F5 helped the second time around.
The first answer provides pretty good instructions on the google apps side of things but the link provided really threw me off with the instructions about setting up stuff at dyndns.com (which seems really strange to me). I only needed to touch google apps, and my domain name provider.
Google has some doc as well which I found http://www.google.com/support/a/bin/answer.py?hl=en&answer=61057
Thanks for everyone's help :)