Questa cosa potrebbe funzionere?
Codice PHP:
$url = 'http://''.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
if ($url == 'http://''.$_SERVER['SERVER_NAME'] | | $url == 'http://''.$_SERVER['SERVER_NAME']./ | | $url == 'http://''.$_SERVER['SERVER_NAME']./index.php) {
echo "Questa è l'home page e ora eseguo il codice";
}
echo "Questa è una sezione";