【发布时间】:2021-02-21 02:12:32
【问题描述】:
我正在尝试通过基于 HTTP/2 指令的 HTML 标头预加载一个文件。但是在对 htaccess 文件进行任何修改后,我收到错误 500。
这是我在 htaccess 中使用的一段代码:
# add custom header to single file
<Files index.html>
Link: </themes/PRS060142/assets/css/570eb83859dc23dd0eec423a49e147fe.woff2>; rel=preload; as=font
</Files>
有人知道通过 htaccess 发送 HTML 头的正确方法是什么吗?
【问题讨论】:
标签: .htaccess http http-headers http2