とりあえず、メモ。

BASIC認証をかけたい時は、.htaccessと、.htpasswdの二つのファイルを用意。

.htaccess


AuthUserFile /で始まるフルパス
AuthGroupFile   /dev/null
AuthName        ByPassword
AuthType        Basic
require valid-user


.htpasswd


ID:pass(要暗号化)


こんな感じで各々記入する。

AuthUserFileは、.htpasswdのパスを、サーバー側のフルパスで書かなきゃだめ。

暗号化は、ここで楽に作れる。http://www.misskita.com/crypt/index.cgi

他にも、検索すればいくらでも出てきそう。

参考サイトは、

http://allabout.co.jp/internet/hpcreate/closeup/CU20020910A/