如何在 MAMP 中更改 mime 类型 [英] how to change mime types in MAMP
问题描述
我正在开发一个包含 HTML5 视频的网站.看起来像当 ogg 文件与视频/ogg firefox 翻转之外的其他 mime 类型一起提供时.我已经更新了 mamp/apache/config 文件夹中的 mime.types 文件并多次重新启动了 MAMP 服务器,但 ogg 文件仍然使用纯文本/文本上下文类型.
I'm developing a website that has a HTML5 video. It looks like when ogg files are served with other mime types than video/ogg firefox flips. I've updated the mime.types file inside the mamp/apache/config folder and have restarted the MAMP server multiple times, but ogg files are still served with plain/text context-type.
有人可以指出我需要做什么吗?
Can someone point out what I need to do?
更新
我唯一能够更改 mime 类型的时间是将 DefaultType text/plain
更改为 DefaultType video/ogg
,这很愚蠢.
The only time I'm able to change the mime type is if I change the DefaultType text/plain
to DefaultType video/ogg
which is stupid.
推荐答案
您是否安装并启用了 mod_mime_magic
?你的哑剧魔术工作正常吗?当您对其中一个 OGG 文件执行 file -m
时,它是否表示它是纯文本文件?文件扩展名是否正确?
Do you have mod_mime_magic
installed and enabled? Is your mime magic working correctly? When you do file -m
on one of your OGG files, does it say it is a plain text file? Are the file extensions correct?
这篇关于如何在 MAMP 中更改 mime 类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!