perfetto ho risolto così:

Codice PHP:
<?php
session_start
();
if(!isset(
$_SESSION['utente'])){
    
header("location:index.php");
}
?>