static public function buildSecondDomainUrl($sdomain, $url=null)
	{
	    $url = static::getRootUrl($url);
	    $parts = parse_url($url);
	    $names = explode('.', $parts['host']);
	    if ($names[0] == 'www') {
	        array_shift($names);
	    }
	    if ($sdomain != $names[0]) {
	        array_unshift($names, $sdomain);
	    }
	    $host = implode('.', $names);
	    
	    $url = $parts['scheme'] . '://' . $host;
	    $port = isset($parts['port']) ? $parts['port'] : null;
	    if ($port && $port != 80 && $port != 443) {
	        $url .= ':'.$port;
	    }
	    
	    return $url;
	}