ciao a tutti!
ho realizzato sul mio sito un sistema di autenticazione basato su .htaccess e .htpasswd in cui un utente (es. guest) si autentica con la password (guestpass) e tramite una pagina .php viene reindirizzato verso una cartella (es. www.miosito.it/reserved/guest/) ma ho un problema..
il file php presente nella cartella "reserved" é composto così:
<?php
$directory['guest'] = "guest/";
$user = $_SERVER['PHP_AUTH_USER'];
$destination = "http://www.miosito.it/restricted/" . $directory[$user];
if ($directory[$user] == null) { echo "utente ", htmlentities($user), "non definito"; exit; }
header("Location: $destination");
?>
solo che a quanto pare.. $user non é definito
cosa ho sbagliato..?
grazie a tutti!