2013-10-13 46 views
0

最近在我的服務器上啓用mod_defalte來壓縮某些文件。mod_deflate壓縮導致swf文件無法正常工作

我認爲安裝程序不會導致與.swf文件有任何問題,但因爲我有.swf文件正在運行的問題,但沒有越過他們的加載屏幕。

mod_deflate模塊目錄的htaccess配置

<ifmodule mod_deflate.c> 
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript 
</ifmodule> 

我發現似乎有與壓縮和相當多的問題.swf文件,但我不確定爲什麼mod_deflate當它被設置爲將影響他們的像上面那樣運行?

可能的原因?

我在WHM-> Apache配置 - >包含編輯器下面有以下設置,這些是默認的mod_deflate設置還是我添加的東西?

我只想做一個基本的配置,如上面的例子,我應該只刪除post_virtualhost_global.conf設置?

mod_deflate模塊 - post_virtualhost_global.conf

<IfModule mod_deflate.c> 
SetOutputFilter DEFLATE 
<IfModule mod_setenvif.c> 
# Netscape 4.x has some problems… 
BrowserMatch ^Mozilla/4 gzip-only-text/html 

# Netscape 4.06-4.08 have some more problems 
BrowserMatch ^Mozilla/4\.0[678] no-gzip 

# MSIE masquerades as Netscape, but it is fine 
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 

# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48 
# the above regex won’t work. You can use the following 
# workaround to get the desired effect: 
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html 

# Don’t compress images 
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary 
</IfModule> 

<IfModule mod_headers.c> 
# Make sure proxies don’t deliver the wrong content 
Header append Vary User-Agent env=!dont-vary 
</IfModule> 
</IfModule> 

來源

mod_deflate模塊和.swf flash文件的問題:https://www.google.co.uk/search?q=mod+defalte+defaults&oq=mod+defalte+defaults&aqs=chrome..69i57j69i60l5.3099j0&sourceid=chrome&espv=210&es_sm=122&ie=UTF-8#es_sm=122&espv=210&psj=1&q=mod_deflate+flash+files

回答

2

該指令在您的Web服務器配置:

SetOutputFilter DEFLATE 

對所有文件啓用DEFLATE壓縮。你不想要這樣 - 隨着Flash文件的搞亂,對於已經被壓縮的數據(包括大多數圖像格式)來說,這是浪費時間。除去它,以及隨後的所有過時的廢話。 (你在那裏的大部分是史前瀏覽器和Web服務器的解決方法。)

+0

謝謝,所以它是安全的,只是刪除所有的,現在用默認值? – Dan