.htaccess
利用マニュアル
利用マニュアル2511.....................................................................................................32-1.

..........................................................................................32-2.

................................................................................................3.htaccess......................................................................................................43-1. MIME(AddType...............................................................................43-2. DirectoryIndex.............................................................................................4

3-3. AuthType Basic..................................................................................................5

4. MIME
5. DirectoyIndex
6. AuthType Basic(AddType........................................................................................6....................................................................................................8BASIC........................................... 102

2-1.
.htaccess

2-2.
.htaccess.htaccess3.htaccess.htaccess/public_html.htaccess•MIME

AddType•
AuthType Basic•

DirectoyIndex

AddType3-1. MIME

DirectoyIndex AuthType Basic3(AddTypeWEB

MIMEMIME.htaccess

AddType.htaccess

AddType/MIME

3-2. DirectoryIndex

http://www.example.jp/user_name/http://www.example.jp/user_name /index.html/URL

index.html

index.html → index.cgi → index.pl → index.php → index.xhtml → index.htm
DirectoryIndex

top.html--Web
URL/
http://xxxx.xxxxx.ne.jp/

http://xxxx.xxxxx.ne.jp/top.html

4URL3-3. AuthType Basic54. MIME(AddType

MIME
MIME

.txt

text/plain

HTML.htm .html

text/html

CSS

.css

text/css

GIF.gif

image/gif

JPEG.jpg .jpeg .jpe

image/jpeg

PNG

.png

image/png

Word.doc .dot

application/msword

PDF.pdf

application/pdf
MIME

AddType.htaccess(1).htaccess
Notepad

AddType MIME タイプ名/サブタイプ名 拡張子"MIME タイプ名/サブタイプ名""拡張子"MIME.docx

Word2007

application/msword

MIME

AddType application/msword .docx(2)OS

htaccess.txt.htaccesshtaccess.txt

6

(3)

FTP

(4)

②

htaccess.txt

htaccess.txt()

rw- --- r-- (604)rw- --- r-- (604)

7

[OK]

.htaccess5. DirectoyIndex(1) .htaccess
NotepadDirectoryIndex ファイル名"ファイル名"http://xxxx.xxxxx.ne.jp/index.html

top.html

DirectoryIndex top.html
DirectoyIndex
DirectoryIndex top.htm toppage.html
top.htm

(2)

OS

(3)

FTP

toppage.html

htaccess.txt.htaccesshtaccess.txt

htaccess.txt

htaccess.txt

8.htaccess

(4)

②()

rw- --- r-- (604)rw- --- r-- (604)9[OK]6. AuthType BasicBASIC(.htaccessBASICBASIC).htaccess.htpasswd.htpasswd

ID/2(1).htaccess
NotepadAuthUserFile /home/isp_user/○○○○○○/××××××/.htpasswd

AuthGroupFile /dev/null"Please Enter Your ID and Password"

AuthName
AuthType

BasicRequire

valid-user<Files ~ "^\.(htpasswd|htaccess)$">deny from all</Files>•1.htpasswd
FTP"sample@homepage1.example.jp"

AuthUserFile /home/isp_user/homepage1.example.jp/sample/.htpasswd

FTP※

••

36 8FTP

Please Enter Your ID and Password
2(<Files> </Files>)

ID/PW.htaccess .htpasswd

•(2)

OS

htaccess.txt.htaccesshtaccess.txt

10(3)htpasswd.htaccessNotepadID.htpasswd★

.htpasswd

http://www.s-memo.net/sample/htaccess/index.php

http://www.softel.co.jp/labs/tools/basic-auth/

http://www.luft.co.jp/cgi/htpasswd.php

http://webtools.dounokouno.com/basic/index.html

http://www.htaccesseditor.com/#a_basic

※
ID:

ID

taro:zJnH3FT022Z5w↑ID↑.htpasswd

ID

user1:fQ0ATTLVpFKV6
user2:Yieu7JdXzEXio

user3:wxr6BARmXIzos
user4:9ef.4CjzJgPqQ
user1

user44ID

password

89(4)
OS

9MD5

MD5
htpasswd.txt.htpasswd

htpasswd.txt

11

(5)

FTP

htaccess.txt

htpasswd.txt
URL

http://homepage1.example.jp/sample/

http://homepage1.example.jp/sample/staff//public_html/staff//

htaccess.txt

htpasswd.txt

FTP/public_html/public_html

HTML.htaccess.htpasswd

ID/

htaccess.txt.htaccesshtpasswd.txt

12.htpasswd

(6)(「.htaccess」②)

rw- --- r-- (604)と「.htpasswd」

rw- --- r-- (604)[OK]

アクセス制限をかけたディレクトリにアクセスし、認証ダイアログが表示され、ユーザー名とパスワードの入力が求められるか確認します。

13