Ensure pattern matching works with URLs that have query parameters