チェ・ゲバムラの日記

脱犬の道を目指す男のブログ

【Apache2.2系】初期に読み込む拡張子を指定するしてSSIを有効化する方法

httpd.confもしくはhtaccessに下記を追加。


DirectoryIndex index.shtml

Options +Includes
AddType text/html shtml
AddHandler server-parsed shtml


これで hogehoge.com にアクセスしたら最初にindex.shtmlを読んでくれて、
その中に記載されているSSIのincludeも読んでくれる。