.htaccess - .htaccess 中的 MIME 类型带或不带前导点

标签 .htaccess mime-types

我在 Firefox 中播放 mp4 时遇到了一些问题(这并不奇怪)。大多数时候,建议在我的 .htaccess 文件中添加一些 MIME 类型。就像是:

AddType video/mp4 mp4 m4v
AddType audio/mp4 m4a
AddType video/ogg ogv
AddType audio/ogg ogg oga
AddType video/webm webm

有些人提出了相同的建议,但有一个前导点:
AddType video/mp4 .mp4 .m4v
AddType audio/mp4 .m4a
AddType video/ogg .ogv
AddType audio/ogg .ogg .oga
AddType video/webm .webm

这两个片段有什么区别?

最佳答案

The extension argument is case-insensitive and can be specified with or without a leading dot.



所以简而言之,这没什么区别,它们都会达到相同的结果。 Read more about AddType here.

关于.htaccess - .htaccess 中的 MIME 类型带或不带前导点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18485765/

相关文章:

php - PHP 头函数的替代品

linux - 无法在 Linux 上确定正确的 MIME 类型

internet-explorer-6 - 如果我将/favicon.ico用作image/vnd.microsoft.icon而不是image/x-icon,它将在任何浏览器上中断吗?

python - 我应该为 python 字符串返回什么 mime 类型

http - 流式 XML Mime 类型?

.htaccess - 301 重定向到具有相同 url 结构的新域

wordpress - .htaccess 和 wordpress 301 重定向不在批准的 IP 地址列表中的每个人?

http - HTTP 多部分 (POST) 请求中的边界参数是什么?

php - htaccess mod_rewrite

php - 禁用目录的 .htaccess