The construction of URLs is affected by the menu entries that point to Remository. For consistent results, it is important to have one menu entry that points to the top level of the repository. That is described as the default Remository view in menu construction. If you do not need a menu entry of that kind for the user interface you are creating, simply create a menu entry of this kind in a menu called e.g. hidden, which is not published anywhere.