为什么我通过 HTTP 访问 *.mp4 文件时会出现错误 404? [英] Why the error 404 happens when I access *.mp4 file by HTTP?
问题描述
我有一些通过 HTTP 的共享文件夹.比方说:http://myserver/files
I have some shared folder over HTTP. Lets say: http://myserver/files
还有png、avi、jpg、mp4等文件.
And there are some filed like png, avi, jpg, mp4 and etc.
我可以通过浏览器 (http://myserver/files/555.avi) 轻松访问 *.png 或 *.avi,但无法访问 *.mp4.
I can easily access *.png or *.avi via browser (http://myserver/files/555.avi) but cannot access to *.mp4.
所以 IIS 给出了 404 错误.
So IIS gives the 404 error.
怎么了?
谢谢!
更新:
可能很重要:我必须通过这种 URL 格式访问
May be it is important: I have to access by this URL format
http://112.333.44.33/files/555.mp4
推荐答案
所以我找到了解决方案.
So I found the solution.
我刚刚向我的网站添加了正确的 MIME 类型.
I just added correct MIME type to my website.
扩展名:mp4
MIME 类型:视频/mpeg
现在它可以正常工作了.
And now it works fine.
这篇关于为什么我通过 HTTP 访问 *.mp4 文件时会出现错误 404?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!