I've got a website : http://foo.com I must give a rails application in : http://foo.com/subdir And So I make use of a Apache Proxy to get it done.

Within the server using the Rails application, I've Passenger and Apache, and my VirtualHost :

<VirtualHost *:80>

  DocumentRoot /path/to/railsapp/public
  RailsEnv production

So when Time passes to http://foo.com/subdir, all of the pathways are incorect (http://foo.com/images, http://foo.com/users, ... etc) but what I'd like is really a subdirectory like (http://foo.com/subdir/images, http://foo.com/subdir/users, ... etc)

Just how could I actually do it please ?

PS : I attempted RailsBaseURI, however it aren't effective :(.

I moved my application to subdir/

I produced b .htaccess with : PassengerEnabled on PassengerAppRoot /path/to/railsapp/subdir

Et mon VirtualHost : DocumentRoot /path/to/railsapp/
AllowOverride All RailsBaseURI /subdir

Thanks AlexD for trying that helped me to.