$url = sprintf('%s://%s%s/index.php', $_SERVER['SERVER_PORT'] == 80 ? 'http' : 'https', $_SERVER['SERVER_NAME'], rtrim(dirname($_SERVER['PHP_SELF']), '/')) header("Location: /SDA/index.php"); exit;