# Rack: URL Mapping

**URL:** <https://www.ruby-forum.com/t/rack-url-mapping/185901>\
**Category:** Ruby\
**Created:** [March 28, 2010, 11:04pm UTC](https://www.ruby-forum.com/t/rack-url-mapping/185901 "2010-03-28T23:04:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![judge](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de0a6/32.png) [@judge](https://www.ruby-forum.com/u/judge)\
**Post date:** [March 28, 2010, 11:04pm UTC](https://www.ruby-forum.com/t/rack-url-mapping/185901/1 "2010-03-28T23:04:32Z")

</div>

Hi,

I am trying to write two kind of Rake routes. As we can see, Rake allow  
us to write such routes as instance:

app = Rack::URLMap.new(’/test’ =\> SimpleAdapter.new,  
‘/files’ =\> Rack::File.new(’.’))

In my case, I would like to handle those routes:

- “/” or “index”
- “/\*” (in order to match any other routes)

So I had trying this:

app = Rack::URLMap.new(’/index’ =\> SimpleAdapter.new,  
‘/’ =\> Rack::File.new(’./public’))

This work well, but… I don’t know how to add ‘/’ path (as alternative  
of ‘/index’ path). The path ‘/\*’ is not interpreted as a joker,  
according to my tests. Do you know how I could do?

Thanks
