diff --git a/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/UrlRuleProvider.cs b/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/UrlRuleProvider.cs index fd653ab9e..35bd0d296 100644 --- a/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/UrlRuleProvider.cs +++ b/src/Orchard.Web/Modules/Orchard.Widgets/RuleEngine/UrlRuleProvider.cs @@ -23,10 +23,10 @@ namespace Orchard.Widgets.RuleEngine { appPath = ""; url = string.Format("{0}/{1}", appPath, url); } - if (!url.Contains("?") && url.EndsWith("/")) + if (url != "/" && !url.Contains("?") && url.EndsWith("/")) url = url.TrimEnd('/'); ruleContext.Result = url.EndsWith("*") - ? context.Request.RawUrl.ToUpperInvariant().StartsWith(url.ToUpperInvariant()) + ? context.Request.Path.ToUpperInvariant().StartsWith(url.ToUpperInvariant()) : context.Request.Path.ToUpperInvariant() == url.ToUpperInvariant(); } }