title: Rails and Multiple base URLs
body: <p>So I'm beginning to think that this isn't possible because hours of googling are turning nothing up.  </p>
  
  <p>I have a single app that will live under multiple URLs being proxied from different servers.  I want to be able to access the same app using both:</p>
  
  <p>example.com/mysite/
  anotherexample.com/</p>
  
  <p>Using a proxy (HAProxy, Apache, whatever) I can get either to work (or both) but the URLs on the page only work for one or the other.  Most notably the asset tags all start with /assets meaning that if I set the base url to be / then visit the site using the first url listed above I get asset tags that look like "example.com/assets" when what i want is "example.com/mysite/assets"</p>
  
  <p>Are there any good workarounds for basing URLs on the request URL instead of a globally defined base?</p>