# Set route for rails

**URL:** <https://www.ruby-forum.com/t/set-route-for-rails/183609>\
**Category:** Rails\
**Created:** [February 17, 2010, 9:51am UTC](https://www.ruby-forum.com/t/set-route-for-rails/183609 "2010-02-17T09:51:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@mohit](https://www.ruby-forum.com/u/mohit)\
**Post date:** [February 17, 2010, 9:51am UTC](https://www.ruby-forum.com/t/set-route-for-rails/183609/1 "2010-02-17T09:51:00Z")

</div>

How we can set routing  
for a controller book having function index  
I mean when i start the server  
it first run the index funxtion of a controller book  
like

[http://localhost:3000/](http://localhost:3000/)

Thanks  
Mohit

---

<div class="post-metadata">

**Author:** ![mohit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c68b51/32.png) [@mohit](https://www.ruby-forum.com/u/mohit)\
**Post date:** [February 17, 2010, 10:03am UTC](https://www.ruby-forum.com/t/set-route-for-rails/183609/2 "2010-02-17T10:03:21Z")

</div>

in configuration/routes.rb:  
map.root :controller =\> ‘book’

Delete index.html in the public folder
