子域到heroku子域
我有一个heroku应用程序,让我们称它为showering-wind-33。我购买了一个顶级域名,我们称之为子域到heroku子域,heroku,dns,subdomain,cname,Heroku,Dns,Subdomain,Cname,我有一个heroku应用程序,让我们称它为showering-wind-33。我购买了一个顶级域名,我们称之为example.com,并通过添加指向shouring-wind-33.herokuapp.com的CNAME,正确地配置了我的域名,以便在heroku上呈现内容。因此,当我访问example.com时,它会呈现shouring-wind-33.herokuapp.com中的内容 我有另一个域foo.com,我想store.foo.com指向store\u中的内容,用于\u foo.ex
example.com
,并通过添加指向shouring-wind-33.herokuapp.com
的CNAME,正确地配置了我的域名,以便在heroku上呈现内容。因此,当我访问example.com
时,它会呈现shouring-wind-33.herokuapp.com
中的内容
我有另一个域foo.com
,我想store.foo.com
指向store\u中的内容,用于\u foo.example.com
,我在这方面遇到了问题
我试过:
1.将我的DNS中的CNAME记录添加到指向\u foo.example.com的store.foo.com
到store\u
2.将store.foo.com
添加到my heroku应用程序设置下的“域”
但结果是store.foo.com
最终指向example.com
,而不是store\u for\u foo.example.com
我做错了什么?任何帮助都将不胜感激-谢谢!如何获取store.foo.com
的内容以显示store\u for\u foo.example.com
纯DNS无法完成,但有一些替代方案:
使用example.com/store,并将store.foo.com URL重定向到该位置
使用某种中间件仅在该域上通过管道传输这些请求
提醒你的丈夫,他写了一本书,书中有关于DNS的部分,他应该知道这一点;)