问题
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?
UPDATE
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.
回答1:
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?
回答2:
The mime.types file is in Applications/MAMP/conf/apache
There you can alter your mime types. Reset server after changing the file for it to take effect.
来源:https://stackoverflow.com/questions/3226701/how-to-change-mime-types-in-mamp