Pour limiter l'acces a un repertoire ("secret ci-dessous") il faut:
(1) Créer un fichier .htaccess dans le répertoire en question et qui ressemble a:
AuthUserFile /comm/tecfa/.wwwpasswd/.htpasswd AuthGroupFile /dev/null AuthName ByPassword AuthType Basic
<Limit GET> require user staf </Limit>
AuthName can be anything you want. AuthType should always currently be Basic.
(2) Create the password file /otherdir/.htpasswd.
The easiest way to do this is to use the htpasswd program distributed with NCSA httpd. Do this:
htpasswd /comm/tecfa/.wwwpasswd/.htpasswd xxxx
Type the password -- xx77 -- twice as instructed.
(3) Pour créer un nouveau fichier mot de passe:
htpasswd -c <fichier> utilisateur