Beispiel #1
0
 protected void Application_BeginRequest()
 {
     try
     {
         if (string.Compare(Request.Url.Host, "quilt4net.com", StringComparison.InvariantCultureIgnoreCase) == 0 || (string.Compare(Request.Url.Scheme, "http", StringComparison.InvariantCultureIgnoreCase) == 0 && (string.Compare(Request.Url.Host, "quilt4net.com", StringComparison.InvariantCultureIgnoreCase) == 0 || string.Compare(Request.Url.Host, "www.quilt4net.com", StringComparison.InvariantCultureIgnoreCase) == 0)))
         {
             var targetUrl = "https://www.quilt4.com" + Request.Url.LocalPath;
             Issue.BeginRegister(string.Format("Redirecting web page."), Issue.MessageIssueLevel.Information, data: new Dictionary <string, string> {
                 { "SourceUrl", "Request.Url.Host" }, { "TargetUrl", targetUrl }
             });
             Response.Redirect(targetUrl, true);
         }
     }
     catch (Exception exception)
     {
         LogException(exception);
         throw;
     }
 }