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:
- Go to tractor.heroku.com and login using admin / radiant.
- If you see the 'Sites' sect开发者_运维技巧ion, you will find Foo and Bar sites.
- 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)
- 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?
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:
freeze radiant (in order to be able to modify application_controller.rb; see http://wiki.github.com/radiant/radiant/running-on-edge )
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
精彩评论