# Routing to a static resource in Mongrel

**URL:** <https://www.ruby-forum.com/t/routing-to-a-static-resource-in-mongrel/103216>\
**Category:** Rails\
**Created:** [May 3, 2007, 12:44am UTC](https://www.ruby-forum.com/t/routing-to-a-static-resource-in-mongrel/103216 "2007-05-03T00:44:37Z")\
**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:** [May 3, 2007, 12:44am UTC](https://www.ruby-forum.com/t/routing-to-a-static-resource-in-mongrel/103216/1 "2007-05-03T00:44:37Z")

</div>

All,

I would like to set up a route that causes a static “index.html” file  
(in the “public” directory) to be served on a request to an empty URL  
path (i.e. map.connect ‘’, …).

Can I do that with Mongrel? Basically, I want the ability to do in  
Mongrel what I will end up doing in Apache with a rewrite directive.

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:** [May 3, 2007, 9:48am UTC](https://www.ruby-forum.com/t/routing-to-a-static-resource-in-mongrel/103216/2 "2007-05-03T09:48:15Z")

</div>

On 03 May 2007, at 00:44, Wes G. wrote:

> I would like to set up a route that causes a static “index.html” file  
> (in the “public” directory) to be served on a request to an empty URL  
> path (i.e. map.connect ‘’, …).
> 
> Can I do that with Mongrel? Basically, I want the ability to do in  
> Mongrel what I will end up doing in Apache with a rewrite directive.

As far as I know, if you have an index.html file in your public  
folder, Mongrel will serve it as the base url (that’s what it does  
when you do “rails someapp” and then serve this new app using mongrel  
on my Powerbook, that’s for sure).

Best regards

Peter De Berdt

---

<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:** [May 3, 2007, 5:31pm UTC](https://www.ruby-forum.com/t/routing-to-a-static-resource-in-mongrel/103216/3 "2007-05-03T17:31:35Z")

</div>

I assume that you would then remove the map.connect ‘’ … from  
routes.rb?
