 <p>You can use the <code>:path</code> option for that, </p> <pre><code>resources :posts, :path =&gt; "/my-dir/posts" </code></pre> <p>Check out <a href="http://guides.rubyonrails.org/routing.html#controller-namespaces-and-routing" rel="nofollow">this guide</a> for more information.</p>