views:

210

answers:

1

Hi, Has anyone got RadiantCMS with multi_site working on Heroku? I actually tried it and it bombed big-time giving the error:

Heroku | No such app
There is no app configured at that hostname.
Perhaps the app owner has renamed it, or you mistyped the URL.

This is what I tried:

  1. Go to tractor.heroku.com and login using admin / radiant.
  2. If you see the 'Sites' section, you will find Foo and Bar sites.
  3. I edited my /etc/hosts files and added foo.myapp.com and bar.myapp.com to the IP address that resolves to tractor.heroku.com (Not entirely sure if this is right)
  4. Now type the URL "http://foo.myapp.com" in the browser and it gives me the above error.

Is there some special configuration required to get this working on Heroku?

+1  A: 

So, I finally did get an answer from heroku support themselves. Pasting it here for everyone's benefit:

reception said: fyi if you want a 301 redirect from appname.heroku.com url to yourdomain.tld i succeeded with this steps:

  1. freeze radiant (in order to be able to modify application_controller.rb; see http://wiki.github.com/radiant/radiant/running-on-edge )

  2. add this code to application_controller.rb inside class ApplicationController:

---->8

before_filter :redirect_domain

def redirect_domain

if request.host == 'appname.heroku.com'

  redirect_to "http://yourdomain.tld#{request.request_uri}", :status=>301

end

end

---->8

(big thanx to David from suppport!)

regards D

Gautam Rege