apache中如何用ssi解析html文件

来源:百度知道 编辑:UC知道 时间:2024/05/25 04:49:26
apache中默认的ssi解析是shtml或shtm,但是由于我的站点所有的静态页都是html的,现在要求html使用ssi解析。

请贴出配置方案。试验确实管用后.

先找到<IfModule mime_module>这个标签,把这两个注释去掉,扩展名改为你想要的就可以了.
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml

例如可以做成以下这样:
AddType text/html .html
AddType text/html .shtml
AddType text/html .htm
AddOutputFilter INCLUDES .html
AddOutputFilter INCLUDES .shtml
AddOutputFilter INCLUDES .htm