support reverse proxy through a base URL with subdirectories

I wanted to run multiple instances over SSL.  Don't want wildcard or multiple certs.

I've only tested in Chrome and Firefox on Windows.  Seems like I may have caused some issue with the appcache starting to download files, but that may be unrelated.

Tested without the proxy some to try and find any issues I may have caused for a normal setup.