Rails 2.2 + Apache 2.2 + RewriteBase /app = broken


I’m trying to run a rails app under an alias like this:

Alias /app /var/www/railsapp/public
RewriteBase /app

I am using the same configuration that has worked for the app under
Rails 1, but since I upgraded it to the latest version I get:

The page you were looking for doesn’t exist.

You may have mistyped the address or the page may have moved.

In the application log, I find that it is looking for routes with /app
at the beginning even though RewriteBase was supposed to take care of
that. What am I missing? How can I make my app happy again? Full
source code is here: