RE: [PHP-DB] .htaccess
| From: | Michael Yevdokimov | Date: | Tue, 18 Sep 2001 08:53:48 +0000 |
| Subject: | RE: [PHP-DB] .htaccess | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12534@lists.php.net to get a copy of this message | ||
Hey man
It's simple...
.htaccess
AuthName "Authentication required"
AuthType Basic
require user admin, mike, nick, bill
AuthUserFile /path/to/password/file/.htpasswd
file .htaccess should be located in the directory you want to protect
.htpasswd
this file consists of the logins and passwords
(syntax:
login:password
)
In the Unix systems you just use htpasswd utility to add records to this
file or to create itself.
Example:
/bin/htpasswd -c /path/to/password/file/.htpasswd admin
Then you enter password for admin
Utility creates a new file .htpasswd
/bin/htpasswd /path/to/password/file/.htpasswd mike
Then you enter password for mike
Utility adds a records in end of the existing .htpasswd
/bin/htpasswd -b /path/to/password/file/.htpasswd nick password
Then utility reads the password from the command line and puts it in the
file.
and so on.
Don't forget to make the right rights for the .htaccess and .htpasswd
Success,
Michael
-----Original Message-----
From: its me [mailto:fotna@egypt.net]
Sent: Tuesday, September 18, 2001 10:42 AM
To: php-db@lists.php.net
Subject: [PHP-DB] .htaccess
where i can find info abour .htaccess and .htpasswd
files and what should be the code inside them????
its urgent please guys
------------------------------------------------------------
------------------------------------------------------------
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net