Fixing that URLs displayed for tenants contained two slashes between the host name and the prefix, when the application path didn't have a virtual directory (Orchard.MultiTenancy)

This commit is contained in:
Lombiq
2014-03-11 18:45:33 +01:00
committed by Benedek Farkas
parent f7f55befc3
commit ba09ba8053

View File

@@ -15,8 +15,9 @@ namespace Orchard.MultiTenancy.Extensions {
!string.IsNullOrEmpty(tenantShellSettings.RequestUrlHost)
? tenantShellSettings.RequestUrlHost + port : host);
if (!string.IsNullOrEmpty(urlHelper.RequestContext.HttpContext.Request.ApplicationPath))
result += urlHelper.RequestContext.HttpContext.Request.ApplicationPath;
var applicationPath = urlHelper.RequestContext.HttpContext.Request.ApplicationPath;
if (!string.IsNullOrEmpty(applicationPath) && !string.Equals(applicationPath, "/"))
result += applicationPath;
if (!string.IsNullOrEmpty(tenantShellSettings.RequestUrlPrefix))
result += "/" + tenantShellSettings.RequestUrlPrefix;