BetterCms.Core.Environment.Host.DefaultCmsHost.OnBeginRequest C# (CSharp) Метод

OnBeginRequest() публичный Метод

Called when the lifecyle of the request begins.
public OnBeginRequest ( System.Web.HttpApplication application ) : void
application System.Web.HttpApplication The application.
Результат void
        public override void OnBeginRequest(HttpApplication application)
        {
            var sourceUrl = application.Request.RawUrl;
            if (redirectControl != null && string.IsNullOrEmpty(application.Request.CurrentExecutionFilePathExtension))
            {
                var redirectUrl = redirectControl.FindRedirect(sourceUrl);
                if (!string.IsNullOrEmpty(redirectUrl))
                {
                    application.Response.RedirectPermanent(redirectUrl);
                }
            }
            base.OnBeginRequest(application);
        }
    }