Ruby on Rails - Static page as start page
- by meetraghu28
Hello!
I am developing an app in RoR which has static and dynamic parts. The static portion is placed in the public/ folder of the app. Now if i have an index.html in my public folder then i will not be able to use the routes configured in my routes.rb The default configurations like map.connect /:controller/:action will not be usable if i have an index.html. So i removed the index html.
Now i have a static page startpage.html in my public/ folder which has to be the starting page of the app. And the i have links in it for other static/dynamic pages.
The RoR app is hosted in apache and i tried to configure the Virtual Host configuration by adding the DirectoryIndex param so that when ever a request comes for the site it will direct it to the startpage.html but still it takes me to the default controller that i have specified in routes.rb with map.root
I dont want to add a dummy controller and action and create a view which has the startpage and configure routes.rb to use it as the root. What i am looking to do here is
Basically startpage.html should be my first page in the app served as a static page from the public/ folder. This will then have links to other pages and controllers/actions
Here i am not able to apache to redirect to the html page instead of passing on the control to rails application. Directory listing is also enabled by using Options Indexes but still no change.
Any pointers anyone?