Fix pattern for url with query.