Webブラウザから「http://www.xxxxxx.com/」などと指定をして読み出されるHTMLファイルは,通常index.htmlやindex.htmだろう。特に「http://www.xxxxxx.com/index.html」と指定せずに済んでいるのは,httpd.conf内で次のように設定しているからだ。
<IfModule mod_dir.c> DirectoryIndex index.html </IfModule> |
Apacheの標準設定ではindex.htmlのみであるが,次のように追加すればよい。アクセス時には,index.htmlから順番に該当するファイルが無いかを走査する。
<IfModule mod_dir.c> DirectoryIndex index.html index.htm index.shtml index.cgi index.php </IfModule> |
Copyright © ITmedia, Inc. All Rights Reserved.