# Routing in Rails

**URL:** <https://www.ruby-forum.com/t/routing-in-rails/80238>\
**Category:** Rails\
**Created:** [March 13, 2006, 10:47am UTC](https://www.ruby-forum.com/t/routing-in-rails/80238 "2006-03-13T10:47:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [March 13, 2006, 10:47am UTC](https://www.ruby-forum.com/t/routing-in-rails/80238/1 "2006-03-13T10:47:59Z")

</div>

I am fiddling around with some special setups and my routing does not  
work.  
So I wonder: how does routing work in Rails?  
Is everything caught by dispatch.cgi script because it is the 404  
handler?  
What happens with static content? Is it supposed to be found before the  
cgi  
script?

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [March 13, 2006, 11:13am UTC](https://www.ruby-forum.com/t/routing-in-rails/80238/2 "2006-03-13T11:13:00Z")

</div>

In default installation, every request to the file that does not exist  
is handled by dispatch.cgi  
This is set up in public/.htaccess

Bart B. wrote:

> I am fiddling around with some special setups and my routing does not  
> work.  
> So I wonder: how does routing work in Rails?  
> Is everything caught by dispatch.cgi script because it is the 404  
> handler?  
> What happens with static content? Is it supposed to be found before the  
> cgi  
> script?

---

<div class="post-metadata">

**Author:** ![bartb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/848f3c/32.png) [@bartb](https://www.ruby-forum.com/u/bartb)\
**Post date:** [March 14, 2006, 9:57am UTC](https://www.ruby-forum.com/t/routing-in-rails/80238/3 "2006-03-14T09:57:06Z")

</div>

Cheltis wrote:

> In default installation, every request to the file that does not exist  
> is handled by dispatch.cgi  
> This is set up in public/.htaccess

That’s interesting. Say I have a setup with  
ActionController::AbstractRequest.relative\_url\_root set. Then that will  
not  
work for existing/static files. So images etc. will not work, right?
