TEST
<?php
error_reporting(E_ALL ^ E_NOTICE);
session_start();
header("Content-Type: text/html; charset=utf-8");
require_once('panel/config/config.inc.php');
require_once('panel/config/func.inc.php');
if (FORCE_DOMAIN && $_SERVER['HTTP_HOST'] != FORCE_DOMAIN) {
$protocol = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on') ? 'http' : 'https';
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $protocol . "://" . FORCE_DOMAIN . "/" . $_SERVER['REQUEST_URI']);
header("Connection: close");
exit();
}
if (FORCE_HTTPS && (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')) {
$currentDomain = $_SERVER['HTTP_HOST'];
header("HTTP/1.1 301 Moved Permanently");
header("Location: https://" . $currentDomain . "/" . $_SERVER['REQUEST_URI']);
header("Connection: close");
exit();
}