diff --git a/Modules/UrlTrackerModule.cs b/Modules/UrlTrackerModule.cs index 22b4a3c..6897b02 100644 --- a/Modules/UrlTrackerModule.cs +++ b/Modules/UrlTrackerModule.cs @@ -209,7 +209,7 @@ static void UrlTrackerDo(string callingEventName, bool ignoreHttpStatusCode = fa if (!redirectHttpCode.HasValue) { // Regex matching - query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = @forceRedirect AND RedirectRootNodeId = @redirectRootNodeId AND OldRegex IS NOT NULL ORDER BY Inserted DESC"; + query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = @forceRedirect AND (RedirectRootNodeId = @redirectRootNodeId OR RedirectRootNodeId = -1) AND OldRegex IS NOT NULL ORDER BY Inserted DESC"; using (IRecordsReader reader = _sqlHelper.ExecuteReader(query, _sqlHelper.CreateParameter("forceRedirect", ignoreHttpStatusCode ? 1 : 0), _sqlHelper.CreateParameter("redirectRootNodeId", rootNodeId))) { @@ -351,7 +351,7 @@ static void UrlTrackerDo(string callingEventName, bool ignoreHttpStatusCode = fa static void LoadUrlTrackerMatchesFromDatabase(HttpRequest request, string urlWithoutQueryString, bool urlHasQueryString, string shortestUrl, int rootNodeId, ref string redirectUrl, ref int? redirectHttpCode, ref bool redirectPassThroughQueryString) { - string query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = 0 AND (RedirectRootNodeId = @redirectRootNodeId OR RedirectRootNodeId IS NULL) AND (OldUrl = @url OR OldUrl = @shortestUrl) ORDER BY CASE WHEN RedirectHttpCode = 410 THEN 2 ELSE 1 END, OldUrlQueryString DESC"; + string query = "SELECT * FROM icUrlTracker WHERE Is404 = 0 AND ForceRedirect = 0 AND (RedirectRootNodeId = @redirectRootNodeId OR RedirectRootNodeId IS NULL OR RedirectRootNodeId = -1) AND (OldUrl = @url OR OldUrl = @shortestUrl) ORDER BY CASE WHEN RedirectHttpCode = 410 THEN 2 ELSE 1 END, OldUrlQueryString DESC"; using (IRecordsReader reader = _sqlHelper.ExecuteReader(query, _sqlHelper.CreateParameter("redirectRootNodeId", rootNodeId), _sqlHelper.CreateParameter("url", urlWithoutQueryString), _sqlHelper.CreateParameter("shortestUrl", shortestUrl))) { while (reader.Read()) @@ -443,7 +443,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.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.ToLower() == urlWithoutQueryString.ToLower() || x.OldUrl.ToLower() == shortestUrl.ToLower())).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/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 90eac56..19a43f2 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -30,7 +30,7 @@ // Build Number // Revision // -[assembly: AssemblyVersion("3.4.*")] +[assembly: AssemblyVersion("3.5.*")] // SQL [assembly: WebResource("InfoCaster.Umbraco.UrlTracker.SQL.MicrosoftSqlServer.create-table-1.sql", "text/plain")] diff --git a/README.md b/README.md index 2204598..864794b 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,11 @@ Set to true to disable tracking not found (404) requests. Set to false to disable appending a port number to redirect URLs ## Changelog ## -* 3.4 [2014/01/28] +* 3.5 [2015/02/20] + * [BugFix] Date in the changelog of v3.4 was wrong + * [BugFix] Manual redirects not working with root set to / ([#62](https://github.com/kipusoep/UrlTracker/issues/62)) + * [Improvement] 404 Not Found View CSS ([#27](https://github.com/kipusoep/UrlTracker/issues/27)) +* 3.4 [2015/01/28] * [BugFix] "Remove at" not working properly ([#49](https://github.com/kipusoep/UrlTracker/issues/49)) * [BugFix] Error during installation: 'ASP.UmbracoHelper' does not contain a definition for 'IsVersion7OrNewer' ([#52](https://github.com/kipusoep/UrlTracker/issues/52)) * [BugFix] JavaScripts errors in backend in IE11 ([#31](https://github.com/kipusoep/UrlTracker/issues/31), updated jQuery) diff --git a/UI/UrlTrackerInfo.aspx b/UI/UrlTrackerInfo.aspx index 8a45de7..b8ed547 100644 --- a/UI/UrlTrackerInfo.aspx +++ b/UI/UrlTrackerInfo.aspx @@ -87,7 +87,15 @@
diff --git a/UI/res/css/urltracker.css b/UI/res/css/urltracker.css index 370c13a..9e76489 100644 --- a/UI/res/css/urltracker.css +++ b/UI/res/css/urltracker.css @@ -53,6 +53,15 @@ table { word-break: break-all; } +.table td, .table th { + -ms-text-overflow: ellipsis; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 400px; + overflow: hidden; +} + .error, .warning, .success, .info { padding: 10px; margin-bottom: .5em;