private void OnBeginRequest(object sender, EventArgs e)
        {
            if (IsUpgrade)
            {
                return;
            }

            // find incoming URL
            string incoming = "";

            try
            {
                // in case of een upgrade, PortalSettings will be null, nothing to do in such a case:
                // if (PortalSettings.Current == null) return;

                var fake = new ControlCollection(new LiteralControl(""));
                Common.Logger.Debug($"Calling DoRedirect From HttpModule");
                RedirectController.DoRedirect(fake, redirectWhenNo404Detected: true, onlyLogWhen404: true);
            }
            catch (Exception exception)
            {
                // we're not writing in the eventlog, since the amount of log records can really explode
                // we MUST catch every possible exception here, otherwise the website would be completely down in case of a bug
            }
        }