Forum: Ruby on Rails Routing to a static HTML file under RAILS_ROOT

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Wes G. (Guest)
on 2006-04-26 21:08
I have a regular plain old static HTML file under my RAILS_ROOT that I
would like to serve as itself (without any dynamic anything).

How can I write a route to "pass the request through" succesfully.

I tried

  map.connect 'path_to_file', :controller => nil, :action => nil, :id =>
nil

but that didn't work.

Also, note that I have this route already configured:

  map.connect '', :controller => "eSimply"

so I'm thinking that maybe that picks up everything?

Thanks,
Wes
Alex Y. (Guest)
on 2006-04-26 21:18
(Received via mailing list)
Wes G. wrote:
> I have a regular plain old static HTML file under my RAILS_ROOT that I
> would like to serve as itself (without any dynamic anything).
Just stick it in your public/ directory.  The web server will spot that
it exists, and not trigger the 404 action that drops into Rails, serving
the static file instead.
Wes G. (Guest)
on 2006-04-26 21:22
Thanks Alex.

I should have checked my path more carefully - I simply asked for the
wrong file.

Sorry for the wasted time.

WG

Alex Y. wrote:
> Wes G. wrote:
>> I have a regular plain old static HTML file under my RAILS_ROOT that I
>> would like to serve as itself (without any dynamic anything).
> Just stick it in your public/ directory.  The web server will spot that
> it exists, and not trigger the 404 action that drops into Rails, serving
> the static file instead.
This topic is locked and can not be replied to.