private string GetUrlToMatch(Uri input) { bool matchingFullUrl = UriUtil.IsWellFormedUriString(this.url.Replace('*', '-'), UriKind.Absolute); string source = matchingFullUrl ? new UriBuilder(input) { Query = "" }.Uri.AbsoluteUri : input.LocalPath; return(source); }