我在遵循这些说明时遇到问题:http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i

发布于 2024-09-18 10:48:17 字数 269 浏览 3 评论 0原文

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

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

I want my apache server to parse shtml files so I can include them in other html files, but I can't seem to understand how to modify the config files, even with these instructions: http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i

Could anyone provide really really specific instructions? Such as specifically what files to open, and where and how to add certain instructions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

子栖 2024-09-25 10:48:17

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

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

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

In the directory where your index.html file is (and I assume your shtml file(s) are) create a file named ".htaccess" and put these three lines in that file:

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Then test if server-side includes (SSI) are working.
(reference: http://httpd.apache.org/docs/2.2/howto/ssi.html#configuring )
You could also try the forums for the MAMP product you're using in case they've made any customizations to apache.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文