Routing to a static HTML file under RAILS_ROOT


#1

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


#2

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.


#3

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.