From 0a789ecd36ad0b5aaed022d12522c68353a5e042 Mon Sep 17 00:00:00 2001 From: kipusoep Date: Thu, 9 Jul 2015 11:43:27 +0200 Subject: [PATCH] [BugFix] Not allowed root "/" in old url (#79) [BugFix] AdvanceView is throwing an exception when having a single domain configured in umbraco (#86) [BugFix] Fixed possible Null Reference exception while looping through the forced redirects collection --- Modules/UrlTrackerModule.cs | 2 +- README.md | 4 +++- UI/UrlTrackerInfo.aspx | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Modules/UrlTrackerModule.cs b/Modules/UrlTrackerModule.cs index 7647a70..1085647 100644 --- a/Modules/UrlTrackerModule.cs +++ b/Modules/UrlTrackerModule.cs @@ -488,7 +488,7 @@ static void LoadUrlTrackerMatchesFromCache(HttpRequest request, string urlWithou if (forcedRedirects == null || !forcedRedirects.Any()) return; - foreach (UrlTrackerModel forcedRedirect in forcedRedirects.Where(x => !x.Is404 && (x.RedirectRootNodeId == rootNodeId || x.RedirectRootNodeId == -1) && (x.OldUrl.ToLower() == urlWithoutQueryString.ToLower() || x.OldUrl.ToLower() == shortestUrl.ToLower())).OrderBy(x => x.RedirectHttpCode == 410 ? 2 : 1).ThenByDescending(x => x.OldUrlQueryString)) + foreach (UrlTrackerModel forcedRedirect in forcedRedirects.Where(x => !x.Is404 && (x.RedirectRootNodeId == rootNodeId || x.RedirectRootNodeId == -1) && (x.OldUrl.Equals(urlWithoutQueryString, StringComparison.CurrentCultureIgnoreCase) || x.OldUrl.Equals(shortestUrl, StringComparison.CurrentCultureIgnoreCase))).OrderBy(x => x.RedirectHttpCode == 410 ? 2 : 1).ThenByDescending(x => x.OldUrlQueryString)) { LoggingHelper.LogInformation("UrlTracker HttpModule | URL match found"); if (forcedRedirect.RedirectNodeId.HasValue && forcedRedirect.RedirectHttpCode != (int)HttpStatusCode.Gone) diff --git a/README.md b/README.md index 2b20a0f..77d0423 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,10 @@ Set to true to disable tracking not found (404) requests. Set to false to disable appending a port number to redirect URLs ## Changelog ## -* 3.9 [2015/05/26] +* 3.9 [2015/07/09] * [BugFix] Not allowed root "/" in old url ([#79](https://github.com/kipusoep/UrlTracker/issues/79)) + * [BugFix] AdvanceView is throwing an exception when having a single domain configured in umbraco ([#86](https://github.com/kipusoep/UrlTracker/pull/86)) + * [BugFix] Fixed possible Null Reference exception while looping through the forced redirects collection * 3.8 [2015/05/22] * [BugFix] Redirects were not working in some cases, for example ([Not working - it returns 404](https://our.umbraco.org/projects/developer-tools/301-url-tracker/version-2/64883-Not-working-it-returns-404)) * [Improvement] Performance improvement; no SQL queries will be performed anymore for valid requests :-) diff --git a/UI/UrlTrackerInfo.aspx b/UI/UrlTrackerInfo.aspx index ccfefba..919dcff 100644 --- a/UI/UrlTrackerInfo.aspx +++ b/UI/UrlTrackerInfo.aspx @@ -87,9 +87,11 @@