Break a URL into protocol, host, path segments and query parameters and edit parameters to rebuild it.