Bu şekilde bir deneyin hocam.

<?php
if (!isset($_SESSION)) {
    ob_start();
    session_start();
}

if (!isset($_SESSION['name']) or !empty($_SESSION['name'])) {
    header('Location: giris.php');
}