Password protecting directories.
Posted: Tue Jun 28, 2005 6:25 pm
I used the following code to create myself the encrypted password for the .htpasswd file:
Do I need to enable something on my server to be able to use .htaccess directory protecting?
Code: Select all
function htpasswd ( $pass ) {
$pass = crypt(trim($pass),base64_encode(CRYPT_STD_DES));
return $pass;
}Code: Select all
AuthType Basic
AuthUserFile /XXXXX/YYYYY/.htpasswd
AuthName "e;This section is for Administration Only."e;
require valid-user