Subdomain with Rails and herokuapp

2019-02-19 12:10发布

问题:

I have followed Ryan Bates railscast on subdomains (http://railscasts.com/episodes/123-subdomains-revised) and have my app working perfectly locally.

I have deployed to heroku but am unable to get my subdomains to work. I have read about custom domains, DNS and CNAME records but I don't think this is relevant because all I am trying to do is test straight on heroku what I was testing locally. So instead of accessing myapp.herokapp.com I would like to be able to access m.myapp.herokuapp.com. Currently when I try this I get the error: There is no app configured at that hostname.

Can anyone offer a solution?

UPDATE:

Whoops, I think this is a duplicate: How to create a subsubdomain for an app on heroku: (e.g. sub.myapp.herokuapp.com)

回答1:

Sub-sub domains aren't possible - you need to be using your own DNS records I'm afraid.