include($path . 'inc/functions.php');
// Auto-detection of URL
-$URL = 'http://' . detectServerName() . str_replace(chr(92), '/', dirname($_SERVER['PHP_SELF']));
+$URL = detectServerProtocol() . '://' . detectServerName() . str_replace(chr(92), '/', dirname($_SERVER['PHP_SELF']));
while (substr($URL, -1, 1) == '/') { $URL = substr($URL, 0, -1); }
// Initialize the configuration