Fix mounted path splitting to ignore search part

This fixes the mounting to ignore what looks like FQDNs in the search part of the URL, which fixes URL mangling then passing plain FQDNs in the search part.

Fixes #939