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

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"-->

你可能感兴趣的:(apache,html)