MENU

futureshopでのbasic認証のかけ方

目次

.htaccessと.htpasswdを設置する

Basic認証には、この二つが必要です。

.htaccess

設置個所は、/public_htmlの直下です。

中身↓

AuthUserfile /home/店舗キー/.htpasswd
AuthGroupFile /dev/null
AuthName "Please enter your ID and password"
AuthType Basic
require valid-user
Options +Includes
AddType text/html html
AddHandler server-parsed html

後半の
Options +Includes
AddType text/html html
AddHandler server-parsed html
は、htmlのインクルード用。

.htpasswd

設置個所は、ドメイン直下のディレクトリ(/public_htmlの一つ上のディレクトリ)です。

中身はこのサイトで生成できます。
http://www.luft.co.jp/cgi/htpasswd.php

※もしくは「.htpasswd 生成」で検索すれば、何かしら見つかると思います。

この記事を書いた人

目次