The Rack URLMap changes the env so that '/app1' is moved from PATH_INFO to SCRIPT_NAME.

You need a helper in your Sinatra application to reconstruct paths :

helpers do
  def path_to(path)
    request.script_name + path
  en
end

and then use it in your templates :

<a href='#{path_to('/page')}'>

2010/10/22 andyl <akleak@gmail.com>
I would like to use Rack to mount modular apps.

Using the 'map' statement in config.ru, I can mount an app just fine.

But - the links in my sub-apps don't work.

If I mount App1 on '/app1', and App1 has a link <a href='/page'>,
it needs to render '/app1/page' instead of '/page'.

How do people get around this problem??

Thanks, Andy