[Rails] Re: public/index.html

Eric Anderson eric at afaik.us
Wed Jan 19 01:19:27 GMT 2005


Nicholas Wieland wrote:
> I'd like to point to my site url and have a dynamic page instead of my
> static public/index.html, but I can't figure out how to do it ... I
> don't need a controller, I only need to check if a user has logged in.
> Well... it would be great to have the possibility to use a layout and
> all other "view" facilities that Rails provides, but actually the only
> thing I need is to render a rhtml page as my index.
> Someone ?

If you are using Apache check out .htaccess. You should see something like:

# Enable this rewrite rule to point to the controller/action that should 
serve root.
# RewriteRule ^$ /controller/action [R]

Simply uncomment and put the controller and action you want to direct 
to. If the action is index than you can leave off the action part.

Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://one.textdrive.com/pipermail/rails/attachments/20050118/d666abef/signature.bin


More information about the Rails mailing list