On Mon, 14 Feb 2005, Doug Fales wrote:
> Don''t you have a job? ;)
i''m hoping to get fired!
> I''m not sure I totally understand what you''re seeing, but
the ''public'' isn''t intended to be used in the URL.
> If you have a rails site running on 127.0.0.1 in the directory
[DocRoot]/todo/public and you also have a
> controller named "TodoController", then the URL to take you to
the ''index'' action of the TodoController is:
> http://127.0.0.1/todo/
this assumes you have only rails apps on your box and can have that .htaccss
sitting in the webroot. if you want to next your app underneath the web root,
say something like
http://www.site.net/blog/
where the blog was made with
rails blog
you''ll then have
blog/public/
as the only starting point. you could do
mv blog/public/* blog
and then could start at
http://www.site.net/blog/
since dispatch.rb lives there. however going to
http://www.site.net/blog/some_controller
will then throw you to
http://www.site.net/dispatch.cgi?controller=some_controller
which, of course, does not exist.
so perhaps a better question is how to setup a rails app that is not rooted at
web root. maybe i''m way off base but it seems like the rewrite rules
assume
you''ll have webroot=approot and therefore work with absolute (/) paths
vs.
relative ones.
> The .htaccess in [yourapp]/public/ has some pretty well commented
mod_rewrite rules.
remind me later - i have some well commented perl for you ;-)
> I didn''t post this to the list because I''m a timid
weenie. I lurk instead
> of participating. Shame on me.
don''t worry - i cc''d the list ;-)
-a
--
==============================================================================|
EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
| PHONE :: 303.497.6469
| When you do something, you should burn yourself completely, like a good
| bonfire, leaving no trace of yourself. --Shunryu Suzuki
===============================================================================