Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
子域到heroku子域_Heroku_Dns_Subdomain_Cname - Fatal编程技术网

子域到heroku子域

子域到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

我有一个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.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的部分,他应该知道这一点;)