Parse url with query params and build url