I have my app up and running at www.domainname.com/controller/ ... but need to get it set up at just www.domainname.com I see that by default, rails is loading the pre-made index file in the /public dir. How can I override this without changing any directories around in my app? Thanks! -stirman -- Posted via http://www.ruby-forum.com/.
Check config/routes.rb There''s a commented line in there that shows how to do this. -- -- Tom Mornini On Jun 9, 2006, at 10:18 AM, Jason Stirman wrote:> I have my app up and running at www.domainname.com/controller/ ... but > need to get it set up at just www.domainname.com > > I see that by default, rails is loading the pre-made index file in the > /public dir. How can I override this without changing any directories > around in my app? > > Thanks! > -stirman > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Hey, First off, you need to remove the public/index.html file. Then in config/routes.rb map.connect '''', :controller => ''your_main_controller'', :action => ''probably_index'' Note, the first arg to connect is a set of empty quotes. Regards, Trevor -- Trevor Squires http://somethinglearned.com On 9-Jun-06, at 10:18 AM, Jason Stirman wrote:> I have my app up and running at www.domainname.com/controller/ ... but > need to get it set up at just www.domainname.com > > I see that by default, rails is loading the pre-made index file in the > /public dir. How can I override this without changing any directories > around in my app? > > Thanks! > -stirman > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Jason Stirman wrote:> I have my app up and running at www.domainname.com/controller/ ... but > need to get it set up at just www.domainname.com > > I see that by default, rails is loading the pre-made index file in the > /public dir. How can I override this without changing any directories > around in my app? > > Thanks! > -stirman1. delete public/index.html 2. add a route in config/routes.rb that looks like: map.home '''', :controller => ''some_controller'', :action => ''index'' -- Posted via http://www.ruby-forum.com/.