Rewrite FQDN URLs correctly for mounted apps

This adjusts the path re-writing for mounted apps to leave the protocol and host alone for FQDN URLs.

Fixes #769