在.htaccess MIME类型带或不带前导点 [英] MIME types in .htaccess with or without leading dot
本文介绍了在.htaccess MIME类型带或不带前导点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有玩在Firefox MP4(难怪有)一些问题。在大多数情况下,有人建议增加一些MIMI类型在我的.htaccess文件。是这样的:
将AddType视频/ MP4 MP4 M4V
将AddType音频/ MP4 M4A
将AddType视频/ OGG远洋船
将AddType音频/ OGG格式OGG OGA
将AddType视频/ WEBM WEBM
有些人提出的相同,但有一个前导点
将AddType视频/ MP4的MP4的.m4v
将AddType音频/ MP4。M4A
将AddType视频/ OGG的.ogv
将AddType音频/ OGG .OGG .oga
将AddType视频/ WEBM .webm
什么是这两个片段之间的区别是什么?
解决方案
扩展参数是不区分大小写的,并且可以带或不带前导点指定。
因此,在短期它没有什么区别,它们都将实现相同的结果。 了解更多关于将AddType这里。
I have some issues with playing mp4 in Firefox (no surprise there). Most of the time, it was suggested to add some MIMI types in my .htaccess file. Something like:
AddType video/mp4 mp4 m4v
AddType audio/mp4 m4a
AddType video/ogg ogv
AddType audio/ogg ogg oga
AddType video/webm webm
Some people suggested the same, but with a leading dot
AddType video/mp4 .mp4 .m4v
AddType audio/mp4 .m4a
AddType video/ogg .ogv
AddType audio/ogg .ogg .oga
AddType video/webm .webm
What's the difference between those two snippets?
解决方案
The extension argument is case-insensitive and can be specified with or without a leading dot.
So in short it makes no difference, they will both achieve the same result. Read more about AddType here.
这篇关于在.htaccess MIME类型带或不带前导点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文