private static function getRootUrl(){
    	// Returns TAO ROOT url based on a call to the API.
    	$isHTTPS = common_http_Request::isHttps();
    	$host = $_SERVER['HTTP_HOST'];
    	$uri = $_SERVER['REQUEST_URI'];
    	$currentUrl = ($isHTTPS ? 'https' : 'http' ). '://' . $host . $uri;
    	$parsed = parse_url($currentUrl);
    	$port = (empty($parsed['port'])) ? '' : ':' . $parsed['port'];
    	$rootUrl = $parsed['scheme'] . '://' . $parsed['host'] . $port . $parsed['path'];
    	return str_replace('/tao/install/api.php', '', $rootUrl);
    }