ITeye博客

如何让apache支持.shtml 让apache支持include标签

sinykk · 2011-07-06 11:47 · web · Web前端 · HTML · Apache · Markdown

如何让apache支持.shtml 让apache支持include标签

第一步,修改httpd.conf文件中,增加文件后缀
AddType   text/html   .shtml   .html

AddOutputFilter INCLUDES .shtml .html
AddHandler   server-parsed   .shtml .html

第二步:继续修改,增加options属性

  <Directory   />  
          Options   FollowSymLinks   MultiViews   Includes  
          AllowOverride   None  
          Allow   from   all  
  </Directory>  

 

然后搜索“Options Indexes FollowSymLinks” 【一定要找到你自己项目运行的目录】
在搜索到的那一行后面添加“ Includes”
即将该行改变为 Options Indexes FollowSymLinks Includes

重启即可

 

包含用法:

 

<!--#include file="sinykk.shtml"-->

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。