Preserve pathname when canonicalising URIs