Apache 开启SSI 支持 html inculde

来源:互联网 发布:淘宝跳蚤街与闲鱼 编辑:程序博客网 时间:2024/06/07 17:52

1.  修改httpd.conf 

找到

AddType text/html .shtml AddOutputFilter INCLUDES .shtml 

如果有注释的话,先去点注释,然后修改为 

    AddType text/html .shtml .htm .html    AddOutputFilter INCLUDES .shtml .htm .html


2. 添加 INCLUDES

还是在httpd.conf 中,找到

Options Indexes FollowSymLinks

在后面添加INCLUDES,

Options Indexes FollowSymLinks INCLUDES


3.重启apache 


引用方式  

<title>A</title></head><body><!--#include virtual ="b.html"--><hr><!--#include virtual ="b.html"--></body></html>