HTML

.htaccessを使用したユーザ認証

'15.11.18

.htaccessに以下を書き込み、対象のディレクトリにアップ

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
AuthUserFile /完全なファイルパス/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your ID and password"
AuthType Basic
require valid-user
AuthUserFile /完全なファイルパス/.htpasswd AuthGroupFile /dev/null AuthName "Please enter your ID and password" AuthType Basic require valid-user
AuthUserFile /完全なファイルパス/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your ID and password"
AuthType Basic
require valid-user

 

次に.htpasswdに以下を書き込み、対象のディレクトリにアップ

ユーザー名: 暗号化パスワード

.htpasswd用パスワード暗号化CGIはこちら ↓

■CGIを開く

(View:1902)