【问题标题】:I'm having trouble following these instructions: http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i我无法按照以下说明操作:http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i
【发布时间】:2011-04-11 11:49:05
【问题描述】:

我希望我的 apache 服务器解析 shtml 文件,以便我可以将它们包含在其他 html 文件中,但我似乎无法理解如何修改配置文件,即使有这些说明:http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i

谁能提供非常具体的说明?比如具体要打开哪些文件,在哪里以及如何添加某些指令。

【问题讨论】:

  • 你真的在运行 apache 1.3.x 吗?
  • 我认为它是 Apache 2.0.63。我从这里下载了 MAMP:mamp.info/en/index.html

标签: apache configuration server-side-includes


【解决方案1】:

在您的 index.html 文件所在的目录中(我假设您的 shtml 文件所在的目录)创建一个名为“.htaccess”的文件并将这三行放入该文件中:

选项+包括 AddType 文本/html .shtml AddOutputFilter 包括 .shtml

然后测试服务器端包含 (SSI) 是否正常工作。
(参考:http://httpd.apache.org/docs/2.2/howto/ssi.html#configuring
您还可以尝试您正在使用的 MAMP 产品的论坛,以防他们对 apache 进行了任何自定义。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-19
    • 1970-01-01
    • 2020-03-25
    • 1970-01-01
    • 1970-01-01
    • 2013-02-15
    • 1970-01-01
    相关资源
    最近更新 更多