public static function getAbsUrl($urlFrom, $urlTo)
    {
        if (strpos($urlTo, '://') !== false) {
            // already absolute;
            return $urlTo;
        }
        $urlAbs = $urlTo;
        if (is_array($urlFrom)) {
            $urlParts = $urlFrom;
        } else {
            $urlParts = Html::parseUrl($urlFrom);
        }
        $urlParts['query']      = null; // do not want absolute url's query
        $urlParts['params']     = array();
        $urlParts['fragment']   = null; // do not want absolute url's fragment
        $path = '';
        if ($urlTo{0} != '/') {
            preg_match('/^(\/.*\/)/', $urlParts['path'], $matches);
            $path = isset($matches[1])
                ? $matches[1]
                : '/';
        }
        $path .= $urlTo;
        $pathSegs = explode('/', $path);
        $pathStack = array();
        foreach ($pathSegs as $k => $seg) {
            if ($seg === '' && $k != 0 && $k < count($pathSegs)-1) {
                continue;
            } elseif ($seg === '.') {
                continue;
            } elseif ($seg === '..') {
                if (array_pop($pathStack) === '') {
                    $pathStack[] = '';
                }
            } else {
                $pathStack[] = $seg;
            }
        }
        $urlParts['path'] = implode('/', $pathStack);
        $urlAbs = Html::buildUrl($urlParts);
        return $urlAbs;
    }