.htaccessでのBasic認証記述例

作成日 2024.04.03

更新日 2024.04.03

はじめに

記述例

<Files ~ "^\.(htaccess|htpasswd)$">
deny from all
</Files>
Options -Indexes
AuthType Basic
AuthName "Input your ID and Password."
AuthGroupFile /dev/null
AuthUserFile /home/[yourdomain]/htdocs/[path]/.htpasswd
require valid-user
order deny,allow