人気ブログランキング | 話題のタグを見る
mytips.exblog.jp ブログトップ

Apache SSI

httpd.conf
を編集
Macなら
/private/etc/httpd/httpd.conf

対象とするディレクティブに
「Includes」をついか

<Directory "/Library/WebServer/Documents">
<Limit GET POST HEAD OPTIONS>
Options FollowSymLinks MultiViews Includes
Order allow,deny
Allow from all
</Limit>
</Directory>

それから、拡張子を有効に下記2行のコメント#を削除

AddType text/html .shtml
AddHandler server-parsed .shtml

apache再起動


hoge.shtml
に下記のように記述

<!--#include virtual="/footer.html" -->
<!--#include file="/footer.html" -->
<hr>
<pre>
<!--#printenv -->
</pre>

以上。

<!--#include
※途中でスペースなど入ると動作しない。
by sato025 | 2005-11-16 01:35 | Server (PostgreSQL)


by fd


var gaJsHost = (("https:" == doc ument.loc ation.protocol) ? "https://ssl." : "http://www.");doc ument.write(unesc ape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));var pageTracker = _gat._getTracker("UA-103429-5");pageTracker._trackPageview();