如何让你的Apache支持include文件解析和支持shtml的相关配置

源地址:http://www.itokit.com/2011/0430/65992.html

Apache支持include文件解析shtml首先要应该修改Apache配置文件httpd.conf

1. 确认加载include.so模块,将注释去掉:
LoadModule include_module libexec/apache2/mod_include.so

2. AddType部分去掉这两段注释:
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

3. Directory目录权限里面找到
Options Indexes FollowSymLinks
增加Includes修改为:
Options Indexes FollowSymLinks Includes

4. 重新启动Apache,测试:

<!–#include file=”head.html”–>
Holle Word!,这是中间的内容
<!–#include file=”foot.html”–>

 

posted on 2015-07-09 10:22  源人  阅读(352)  评论(0编辑  收藏  举报

导航