shtml来include网页文件(开启SSI)Apache2.2.11 配置

本文介绍如何在Apache 2.2.11中启用SSI功能,通过修改httpd.conf文件实现shtml文件的服务器端包含功能。具体步骤包括调整MIME类型设置、更改目录选项及重启Apache服务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

shtml来include网页文件(开启SSI)Apache2.2.11  (httpd.conf文件)配置

1、 去掉AddType text/html .shtml ,AddOutputFilter INCLUDES .shtml注释

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    #AddType text/html .shtml
    #AddOutputFilter INCLUDES .shtml

 

2、查找Options Indexes FollowSymLinks  在后面加上INCLUDES

  <Directory />
  #    Options FollowSymLinks
  #    AllowOverride None
  #    Order deny,allow
  #    Deny from all
      Options Indexes FollowSymLinks INCLUDES
      AllowOverride None
  </Directory>

3、重新启动apache ,ok你的shtml就可以加载页面了。

 

4、shtml页面语法<!--#include virtual="/indfoot.shtml"-->

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值