# Path\_prefix for all routes

**URL:** <https://www.ruby-forum.com/t/path-prefix-for-all-routes/168812>\
**Category:** Rails\
**Created:** [May 26, 2009, 10:47am UTC](https://www.ruby-forum.com/t/path-prefix-for-all-routes/168812 "2009-05-26T10:47:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![milandobrota](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/9fc29f/32.png) [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Post date:** [May 26, 2009, 10:47am UTC](https://www.ruby-forum.com/t/path-prefix-for-all-routes/168812/1 "2009-05-26T10:47:08Z")

</div>

I’m deploying RoR application on Hostgator (shared hosting).  
I want my application address to be [www.domain.com/foo/bar/](http://www.domain.com/foo/bar/)  
Foo is the folder and bar is the symlink that points to the public  
folder of my rails application located in my home folder.  
[www.domain.com/foo/bar](http://www.domain.com/foo/bar) gives me index.html page, but I can’t hit any  
controllers until I set :path\_prefix =\> ‘foo’ for all routes. Is there  
any better way to do it (setting the path\_prefix for all routes at once,  
or maybe I should change my .htaccess file)

My .htaccess is like this:  
[http://forums.hostgator.com/ruby-rails-support-t13038p7.html](http://forums.hostgator.com/ruby-rails-support-t13038p7.html)

Thank you in advance.
