# Routing to a static HTML file under RAILS\_ROOT

**URL:** <https://www.ruby-forum.com/t/routing-to-a-static-html-file-under-rails-root/58869>\
**Category:** Rails\
**Created:** [April 26, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/routing-to-a-static-html-file-under-rails-root/58869 "2006-04-26T19:08:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [April 26, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/routing-to-a-static-html-file-under-rails-root/58869/1 "2006-04-26T19:08:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [April 26, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/routing-to-a-static-html-file-under-rails-root/58869/2 "2006-04-26T19:18:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [April 26, 2006, 7:22pm UTC](https://www.ruby-forum.com/t/routing-to-a-static-html-file-under-rails-root/58869/3 "2006-04-26T19:22:49Z")

</div>

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.
