xampp on windows で.htaccessの設定方法

htdocsに「a.htaccess」「a.htpasswd」を設置

renコマンドで.htaccess、.htpasswdに改名する

.htaccessの中身

AuthUserFile ../htdocs/.htpasswd
AuthName "Please enter your ID and password"
AuthType Basic
require valid-user

・.htasswd はlinuxのパスワード生成のやりかたでは出来ないので
apacheの「htpasswd.exe」を使う

\\192.168.1.1\xampp\apache\bin\htpasswd.exe -mc \\192.168.1.1\xampp\htdocs\.htpasswd myuser

以上。