Hi all, I''ve stumbled upon a little problem and would like to know what are the best practices out there. I''d like to know how do you go about creating a main page, i.e., the initial page in which you are not yet on a concrete controller (or, you are on the ''default'' one, so to speak) that would sit directly in the public folder, but that would be useful for it to be able to interpret erb., for example, to embed a login form using the same code as the login example in the login generator. I have tried using an .rhtml page, but of course, dispatch.cgi isn''t even called to interpret it. Will I have to use .htaccess magic to do that, rewriting to a main/index.rhtml view, for example? I would like for it to have a pretty URL, like http://mydomain/myapp/ , but I''m not sure how to proceed or if there''s an easier way. I know my question is not properly articulated, please excuse me, it''s too early in the morning for me yet :P Thanks in advance Victor
On Tue, Dec 28, 2004 at 10:06:40AM +0100, Victor Jalencas wrote:> Hi all, > > I''ve stumbled upon a little problem and would like to know what are > the best practices out there. > > I''d like to know how do you go about creating a main page, i.e., the > initial page in which you are not yet on a concrete controller (or, you > are on the ''default'' one, so to speak) that would sit directly in the > public folder, but that would be useful for it to be able to interpret > erb., for example, to embed a login form using the same code as the > login example in the login generator. I have tried using an .rhtml page, > but of course, dispatch.cgi isn''t even called to interpret it. > > Will I have to use .htaccess magic to do that, rewriting to a > main/index.rhtml view, for example? I would like for it to have a pretty > URL, like http://mydomain/myapp/ , but I''m not sure how to proceed or if > there''s an easier way.In .htaccess is a line disabled that looks like this: RewriteRule ^$ /controller/action [R] Enable it and change it to the controller and action you want. Hope this helps, Roeland
Roeland Moors wrote:> > In .htaccess is a line disabled that looks like this: > RewriteRule ^$ /controller/action [R] > Enable it and change it to the controller and action you want. >Thanks! That''s exactly what I was looking for. Victor