这可能非常简单,但我的编码器正在度假和通讯中,我是一名具有相当基本的HTML和CSS知识的平面设计师.这超出了我的范围.
我们的一个客户端站点正在解决此问题:
.htaccess:FilterProvider接受三个参数,filter-name provider-name match-expression
我认为它与.htaccess文件的这一部分有关,但如果我知道答案是什么,我该死的:
#强制deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/SetEnvIfNoCase
^(Accept-EncodXng | X-cept-Encoding | X {15} |〜{15} | - {15})$ ^((gzip | deflate)\ s*,?\ s*)+ | [X~ - ] {4,13} $ HAVE_Accept-Encoding RequestHeader追加接受编码"gzip,deflate"env = HAVE_Accept-Encoding
#HTML,TXT,CSS,JavaScript,JSON,XML,HTC:
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp = Content-Type $ text/html
FilterProvider COMPRESS DEFLATE resp = Content-Type $ text/css
FilterProvider COMPRESS DEFLATE resp = Content-Type $ text/plain
FilterProvider COMPRESS DEFLATE resp = Content-Type $ text/xml
FilterProvider COMPRESS DEFLATE resp = Content-Type $ text/x-component
FilterProvider COMPRESS DEFLATE resp = Content-Type $ application/javascript
FilterProvider COMPRESS DEFLATE resp = Content-Type $ application/json
FilterProvider COMPRESS DEFLATE resp = Content-Type $ application/xml
FilterProvider COMPRESS DEFLATE resp = Content-Type $ application/xhtml + xml
FilterProvider COMPRESS DE FLATE resp = Content-Type $ application/rss + xml
FilterProvider COMPRESS DEFLATE resp = Content-Type $ application/atom + xml
FilterProvider COMPRESS DEFLATE resp = Content-Type $ application/vnd.ms -fontobject
FilterProvider COMPRESS DEFLATE resp = Content-Type $ image/svg + xml
FilterProvider COMPRESS DEFLATE resp = Content-Type $ image/x-icon
FilterProvider COMPRESS DEFLATE resp = Content-Type $ application/x-font-ttf
FilterProvider COMPRESS DEFLATE resp = Content-Type $ font/opentype
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change = yes; byteranges = no
#旧版本的Apache
AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
AddOutputFilterByType DEFLATE application/xhtml + xml application/rss + xml application/atom + xml
AddOutputFilterByType DEFLATE image/x-icon image/svg + xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
如果有人可以提供帮助,我将非常感激!
更换
FilterDeclare COMPRESS
...
...
...
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
Run Code Online (Sandbox Code Playgroud)
同
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/html'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/css'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/plain'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/x-component'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/javascript'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/json'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/xhtml+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/rss+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/atom+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/vnd.ms-fontobject'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/svg+xml'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'image/x-icon'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'application/x-font-ttf'"
FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'font/opentype'"
FilterChain COMPRESS
FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1104 次 |
| 最近记录: |