$htaccess[] = ""; } if ($config['correctsubdomains'] == 1) { $url = parse_url($config['furl']); $host = str_ireplace('www.', '', $url['host']); $htaccess[] = "RewriteEngine On"; $htaccess[] = "RewriteCond %{HTTP_HOST} ^www\\." . preg_quote($host) . "\$ [NC]"; $htaccess[] = "RewriteRule ^(.*)\$ http://" . $host . "/\$1 [R=301,L]"; $htaccess[] = ""; } $filesystem->file_put_contents('.htaccess', implode("\r\n", $htaccess)); } $breadcrumb = new breadcrumb(); $breadcrumb->Add($config['fname'], 'index.php'); $phpdoc = new OutputDoc($config['gzip']); $phpdoc->Start($config['gzcompression']); define('PAGE_IS_GZIPPED', $config['gzip'] == 1 && $phpdoc->Encoding()); ($code = $plugins->load('frontend_init')) ? eval($code) : null; // Global and important functions (not for cron and external) if (defined('TEMPNOFUNCINIT') == false || $config['foffline'] && defined('TEMPSHOWLOG') == false) { define('SCRIPT_START_TIME', benchmarktime()); $slog = new slog(); $my = $slog->logged(); $lang->init($my->language); $tpl = new tpl(); $slog->checkBan(); } if ($config['foffline'] && defined('TEMPSHOWLOG') == false) { $my->p = $slog->Permissions(); if ($my->p['admin'] != 1) { $offline = file_get_contents('data/offline.php');