在过去的两天里,我一直在关注许多帖子。Firefox不会在此链接上播放OGV文件,但是在本地服务器上可以正常工作。文件是chmod 777。
这在.htaccess文件中:
SetEnv no-gzip dont-vary
RewriteRule . - [E=no-gzip:0]
<FilesMatch "^(?!.*\.ogg$|.*\.ogv$).+" >
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE env=notogg true
FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
FilterChain COMPRESS
FilterProtocol COMPRESS change=yes;byteranges=no
</IfModule>
</FilesMatch>
AddType audio/ogg .oga .ogg
AddType video/ogg .ogv
AddType application/ogg .ogg
AddType video/webm .webm
AddType video/mp4 .mp4我在这页的顶部有这样的信息:
<?php ini_set('zlib.output_compression', 'Off'); ?>这是代码:
<video width="720" height="405" controls autoplay preload >
<source src="beautiful_soul_aw111.mp4" type='video/mp4' />
<source src="beautiful_soul_aw11.m4v" type='video/mp4' />
<source src="beautiful_soul_aw11.ogv" type='video/ogg' />
<source src="beautiful_soul_aw11.webm" type='video/webm' />
</video>当我执行phpinfo时,我看到服务器忽略了我关闭gzip的请求。
我使用curl进行了检查,该文件被用作正确的类型:
curl -I http://www.beautiful-soul.co.uk/collections/beautiful_soul_aw11.ogv
HTTP/1.1 200 OK
Date: Mon, 29 Aug 2011 18:44:03 GMT
Server: Apache/2
Last-Modified: Mon, 29 Aug 2011 17:44:49 GMT
ETag: "36976a8-4aba873976640"
Accept-Ranges: bytes
Content-Length: 57243304
Content-Type: video/ogg当我查看页面并获取页面信息时,它显示如下:
Location: http://www.beautiful-soul.co.uk/collections/beautiful_soul_aw11.ogv
Type: video/ogg
Size: 8 KB (8192 bytes)
Dimensions: 0px × 0px
Associated Text: AC_FL_RunContent(...我不知道为什么。
.htaccess文件将被忽略,GZIP仍然被启用。发布于 2012-01-10 12:28:01
是啊,很抱歉回复得太晚了。我重新安装/更新了firefox。这是通过取出ogg版本来解决的。
<video width="720" height="405" preload controls autoplay >
<source src="beautiful_soul_aw111.mp4" type='video/mp4' />
<source src="beautiful_soul_aw11.m4v" type='video/mp4' />
<!--<source src="beautiful_soul_aw11.ogv" type='video/ogg' />-->
<source src="beautiful_soul_aw11.webm" type='video/webm' />
</video>它现在在所有的浏览器上都很好。
谢谢
Andi
https://stackoverflow.com/questions/7234608
复制相似问题