Fixed the problem of a slash at the begining of the path causing a host not found exception when there are parameters

Made the mapping more flexible in preparation for the reingestion work.