# Default routing to main page and hiding the original request

**URL:** <https://www.ruby-forum.com/t/default-routing-to-main-page-and-hiding-the-original-request/91984>\
**Category:** Rails\
**Created:** [April 14, 2007, 12:19am UTC](https://www.ruby-forum.com/t/default-routing-to-main-page-and-hiding-the-original-request/91984 "2007-04-14T00:19:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehudros](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3ec8ea/32.png) [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Post date:** [April 14, 2007, 12:19am UTC](https://www.ruby-forum.com/t/default-routing-to-main-page-and-hiding-the-original-request/91984/1 "2007-04-14T00:19:44Z")

</div>

Hi everyone,  
I’m currently redirecting every request that has not matched any other  
route  
to my site controller’s index action.  
so if someone has tried to access [Custom Application Development Software for Business - Salesforce.com](http://www.site.com/does/not/exist) they are  
actually  
accessing [www.site.com](http://www.site.com). However, the original request is still there and  
that’s bad. How can I forcefully redirect to [www.site.com/](http://www.site.com/)?

obviously it cant be done in the index action itself (since it will  
redirect for ever).

I’m guessing the solution is pretty simple?

Ehud
