I have an existing Rails 3.1rc4 app deployed to heroku on the Bamboo stack. I would like to upgrate to 3.1rc5 and use the new Cedar stack. Since I can't use heroku stack:migrate
, I have to create a new stack and push to that. The problem is that my current app is located at appname.heroku.com
. If I simply delete this app, and recreate it using Cedar, then it would become appname.herokuapp.com
. How would I move to Cedar while still keeping appname.heroku.com
?
Easy, just rename your old app to something like appnameold
then create a new one with heroku create appname --stack cedar
. Heroku takes care of the redirecting automatically and your previous links shouldn't break. You can Google for herokuapp.com
site names and test them if you want to verify that.
If your question is how to have both subdomains separately or you simply like the look of appname.heroku.com
over appname.herokuapp.com
, however, you're out of luck.
I just did a migration to cedar stack today (by deleting the app via web interface and recreating it again with --stack cedar), and was glad to find out that the redirect is now automatic, from http://devcenter.heroku.com/articles/error-codes#h16__redirect_to_herokuappcom:
H16 - Redirect to herokuapp.com
Apps on Cedar’s new HTTP routing stack use the herokuapp.com domain. Requests made to a Cedar app at its deprecated heroku.com domain will be redirected to the correct herokuapp.com address and this redirect message will be inserted into the app’s logs.
You can't - Cedar apps use herokuapp.com - but you could put a sinatra app on appname.heroku.com to redirect to appname.herokuapp.com perhaps or within your existing app?? Or use a custom domain perhaps?
© 2022 - 2024 — McMap. All rights reserved.