示例#1
0
 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();
 }
示例#2
0
 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();
 }