Alternatif önereceğim; x.php'de bir session oluşturup z.php'de bunu kontrol edin, yoksa header ile hata mesajına yönlendirin.