Hello, Not sure if anyone can help me here. I have a page which I want to make it the index page. The page is http://www.myweb.com:3000/bin/myindex.mxml. Yes, you can probably tell it''s a Adobe Flex component - myindex.mxml. I''m combining Flex and RubyOnRails. My question is: Is there a way to make that the default page to display when people browse to http://www.myweb.com:3000/. Apreciate if anyone could help. Regards, Jay -- Posted via http://www.ruby-forum.com/.
Jacob Yong wrote:> Hello, > Not sure if anyone can help me here. I have a page which I want to > make it the index page. > > The page is http://www.myweb.com:3000/bin/myindex.mxml. > > Yes, you can probably tell it''s a Adobe Flex component - myindex.mxml. > I''m combining Flex and RubyOnRails. > > My question is: Is there a way to make that the default page to > display when people browse to http://www.myweb.com:3000/. > > Apreciate if anyone could help. > > Regards, > JayDefine a default route in routes.rb ie map.root ''/bin/myindex.mxml'' ..at least, thats how you would define a default controller/action as the root, so I think it will probably apply to a static resource. -- Posted via http://www.ruby-forum.com/.
Not sure that the previous solution will work. If the page is dynamic then, point root to the right controller and action. map.root :controller => ''yourcontroller'', :action => ''youraction'' If it''s static then you''ll better think twice if you need it, and if you realy need then try one of the following things: 1. Symlink it to the /index.html 2. Try Apache DirectoryIndex, or nginx index directives, although I''m not sure that they allow setting the default page in another directory. 3. Use URL rewriting on the webserver level Dmitry