# Fixing routes when Rails app is subdirectory

**URL:** <https://www.ruby-forum.com/t/fixing-routes-when-rails-app-is-subdirectory/90188>\
**Category:** Rails\
**Created:** [March 26, 2007, 7:05pm UTC](https://www.ruby-forum.com/t/fixing-routes-when-rails-app-is-subdirectory/90188 "2007-03-26T19:05:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zakifataya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/c89c15/32.png) [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Post date:** [March 26, 2007, 7:05pm UTC](https://www.ruby-forum.com/t/fixing-routes-when-rails-app-is-subdirectory/90188/1 "2007-03-26T19:05:44Z")

</div>

If I have Apache configured to proxy /foo to Rails behind Mongrel, how  
do I fix routes to always include the subdirectory?

In other words, main Rails page is here:

[http://127.0.0.1/foo/](http://127.0.0.1/foo/)

But application environment page fails because it’s here

[http://127.0.0.1/foo/rails/info/properties](http://127.0.0.1/foo/rails/info/properties)

not here

[http://127.0.0.1/rails/info/properties](http://127.0.0.1/rails/info/properties)
