public static function init() { self::$domainsByMountId = []; self::$domainsByName = []; self::$aliasDomains = []; self::$paths = []; self::addDomain(new rex_yrewrite_domain('undefined', 0, rex_article::getSiteStartArticleId(), rex_article::getNotfoundArticleId())); self::$pathfile = rex_path::addonCache('yrewrite', 'pathlist.php'); self::$configfile = rex_path::addonCache('yrewrite', 'config.php'); self::readConfig(); self::readPathFile(); }
public static function init() { if (null === self::$scheme) { self::setScheme(new rex_yrewrite_scheme()); } self::$domainsByMountId = []; self::$domainsByName = []; self::$aliasDomains = []; self::$paths = []; $path = dirname($_SERVER['SCRIPT_NAME']); if (rex::isBackend()) { $path = dirname($path); } $path = rtrim($path, '/') . '/'; self::addDomain(new rex_yrewrite_domain('default', null, $path, 0, rex_article::getSiteStartArticleId(), rex_article::getNotfoundArticleId())); self::$pathfile = rex_path::addonCache('yrewrite', 'pathlist.php'); self::$configfile = rex_path::addonCache('yrewrite', 'config.php'); self::readConfig(); self::readPathFile(); }