Fix remote share when remote server is installed at the root

Correctly handle the case where the remote server is installed directly at the domain root and thus has no `/`

cc @PVince81 @DeepDiver1975