怎样让httpd2.2支持ssi(server side include)

权威文档可以看这里
只想简单应用又懒得看e文的就听我道来
首先
你需要让apache知道怎么去解析.shtml文件(这里假设有ssi的文件的扩展名为shtml)

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

从httpd2.0开始就用这两句
在以前apache1.3.x的时候貌似是另外的一句
然后要在你要实现ssi功能的目录下标明:

Options +Includes

比如

<Directory /var/www/html>
Options +Includes
</Directory>

最后
重起apache
即可

Discussion Area - Leave a Comment




*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word