0) foreach ($banned as $bannedstr) if (strpos($uri, $bannedstr)!==false) { $bannedfl = true; break; } if ($redir404 AND parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST)!==$_SERVER['SERVER_NAME'] AND !$bannedfl) { header("HTTP/1.1 301 Moved Permanently"); header('Location: https://'.$_SERVER['SERVER_NAME'].'/'); exit(); } header("HTTP/1.1 404 Not Found"); $langtemp = substr($uri, 1, 4); if (substr($langtemp, 0, 1)==='/' AND substr($langtemp, 3, 1)==='/') { $lang = substr($langtemp, 1, 2); if (is_file($lang.'/404.html')) { $content = file_get_contents($lang.'/404.html'); } else $content = file_get_contents("404.html"); } else $content = file_get_contents("404.html"); $str404 = preg_replace('/[^ a-zа-яё\d]/ui', ' ', urldecode($_SERVER['REQUEST_URI'])); $content = preg_replace("/\
' . '' . // прилипашка для мобильного '