protected function _getBaseUrlPaths() {
        $paths = array();
        $linkTypes = array(Mage_Core_Model_Store::URL_TYPE_LINK,
                            Mage_Core_Model_Store::URL_TYPE_JS,
                            Mage_Core_Model_Store::URL_TYPE_SKIN,
                            Mage_Core_Model_Store::URL_TYPE_MEDIA);
        foreach (Mage::app()->getStores() as $store) {
            foreach ($linkTypes as $linkType) {
                $paths[] = parse_url($store->getBaseUrl($linkType, false),
                    PHP_URL_PATH);
                $paths[] = parse_url($store->getBaseUrl($linkType, true),
                    PHP_URL_PATH);
            }
        }
        $paths = array_unique($paths);
        usort($paths, create_function('$a, $b',
            'return strlen( $b ) - strlen( $a );'));
        return array_values($paths);
    }