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);
}
}