urls can begin with / if they are on the same server

@DeepDiver1975: As requested, the url fix as separate branch extracted from https://github.com/owncloud/apps/pull/1857.