diff --git a/src/Umbraco.Core/UriExtensions.cs b/src/Umbraco.Core/UriExtensions.cs
index 6ace17220b..430ba4b6d1 100644
--- a/src/Umbraco.Core/UriExtensions.cs
+++ b/src/Umbraco.Core/UriExtensions.cs
@@ -100,29 +100,6 @@ namespace Umbraco.Core
return true;
}
- ///
- /// Checks if it is a back office login or logout request
- ///
- ///
- ///
- ///
- internal static bool IsBackOfficeLoginRequest(this Uri url, string applicationPath)
- {
- applicationPath = applicationPath ?? string.Empty;
-
- var fullUrlPath = url.AbsolutePath.TrimStart(new[] { '/' });
- var appPath = applicationPath.TrimStart(new[] { '/' });
- var urlPath = fullUrlPath.TrimStart(appPath).EnsureStartsWith('/');
-
- if (urlPath.InvariantStartsWith(GlobalSettings.Path.EnsureStartsWith('/') + "/login.aspx")
- || urlPath.InvariantStartsWith(GlobalSettings.Path.EnsureStartsWith('/') + "/logout.aspx"))
- {
- return true;
- }
-
- return false;
- }
-
///
/// Checks if the current uri is an install request
///
@@ -139,6 +116,23 @@ namespace Umbraco.Core
return afterAuthority.InvariantStartsWith(IOHelper.ResolveUrl("~/install").TrimStart("/"));
}
+ ///
+ /// Checks if the uri is a request for the default back office page
+ ///
+ ///
+ ///
+ internal static bool IsDefaultBackOfficeRequest(this Uri url)
+ {
+ if (url.AbsolutePath.InvariantEquals(GlobalSettings.Path.TrimEnd("/"))
+ || url.AbsolutePath.InvariantEquals(GlobalSettings.Path.EnsureEndsWith('/'))
+ || url.AbsolutePath.InvariantStartsWith(GlobalSettings.Path.EnsureEndsWith('/') + "Default.aspx")
+ || url.AbsolutePath.InvariantStartsWith(GlobalSettings.Path.EnsureEndsWith('/') + "Umbraco.aspx"))
+ {
+ return true;
+ }
+ return false;
+ }
+
///
/// This is a performance tweak to check if this is a .css, .js or .ico, .jpg, .jpeg, .png, .gif file request since
/// .Net will pass these requests through to the module when in integrated mode.
diff --git a/src/Umbraco.Web/UmbracoModule.cs b/src/Umbraco.Web/UmbracoModule.cs
index a321196b88..48cb9c82d6 100644
--- a/src/Umbraco.Web/UmbracoModule.cs
+++ b/src/Umbraco.Web/UmbracoModule.cs
@@ -83,16 +83,10 @@ namespace Umbraco.Web
var umbracoContext = UmbracoContext.Current;
- //if it's a back office login request, do not continue
- if (httpContext.Request.Url.IsBackOfficeLoginRequest(HttpRuntime.AppDomainAppVirtualPath))
- {
- return;
- }
-
//if it's a back office request then we need to ensure we're configured - otherwise redirect to installer
- if (httpContext.Request.Url.IsBackOfficeRequest(HttpRuntime.AppDomainAppVirtualPath)
+ if (httpContext.Request.Url.IsDefaultBackOfficeRequest()
&& EnsureIsConfigured(httpContext, umbracoContext.OriginalRequestUrl) == false)
- {
+ {
return;
}