Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
[BugFix] Not allowed root "/" in old url (#79)
Browse files Browse the repository at this point in the history
[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
  • Loading branch information
kipusoep committed Jul 9, 2015
1 parent eab9ae0 commit 0a789ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Modules/UrlTrackerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :-)
Expand Down
6 changes: 4 additions & 2 deletions UI/UrlTrackerInfo.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@
<div class="tab-pane" id="changeLog">
<ul>
<li>
3.9 [2015/05/26]
3.9 [2015/07/09]
<ul>
<li>[BugFix] Not allowed root "/" in old url <a target="_blank" href="https://github.com/kipusoep/UrlTracker/issues/79">#79</a></li>
<li>[BugFix] Not allowed root "/" in old url (<a target="_blank" href="https://github.com/kipusoep/UrlTracker/issues/79">#79</a>)</li>
<li>[BugFix] AdvanceView is throwing an exception when having a single domain configured in umbraco (<a target="_blank" href="https://github.com/kipusoep/UrlTracker/pull/86">#86</a>)</li>
<li>[BugFix] Fixed possible Null Reference exception while looping through the forced redirects collection</li>
</ul>
</li>
<li>
Expand Down

0 comments on commit 0a789ec

Please sign in to comment.