diff --git a/main.inc.php b/main.inc.php
index ff0044d43c8a9c05b88ee48fea00d351263b45c4..d8af22b8b44cb93e7a5c65fc6d7c90c780dfd721 100644
--- a/main.inc.php
+++ b/main.inc.php
@@ -75,6 +75,7 @@
 
 
     require(INCLUDE_DIR.'class.osticket.php');
+    require(INCLUDE_DIR.'class.http.php');
 
     // Determine the path in the URI used as the base of the osTicket
     // installation
@@ -93,7 +94,7 @@
     } elseif(file_exists(INCLUDE_DIR.'ost-config.php')) //NEW config file v 1.6 stable ++
         $configfile=INCLUDE_DIR.'ost-config.php';
     elseif(file_exists(ROOT_DIR.'setup/'))
-        header('Location: '.ROOT_PATH.'setup/');
+        Http::redirect(ROOT_PATH.'setup/');
 
     if(!$configfile || !file_exists($configfile))
        Http::response(500, '<b>Error loading settings. Contact admin.</b>');
@@ -126,7 +127,6 @@
     require(INCLUDE_DIR.'class.log.php');
     require(INCLUDE_DIR.'class.crypto.php');
     require(INCLUDE_DIR.'class.timezone.php');
-    require(INCLUDE_DIR.'class.http.php');
     require(INCLUDE_DIR.'class.signal.php');
     require(INCLUDE_DIR.'class.nav.php');
     require(INCLUDE_DIR.'class.page.php');