xjkp[oaslk; 发表于 2015-11-14 16:12:32

IIS开启伪静态的GZip压缩

  今天,开通了自己的网站www.lovemu.com.cn
  根据http://www.cnblogs.com/zhangziqiu/archive/2009/05/17/gzip.html
  试了下开启Gzip压缩,可是检测之后http://tool.chinaz.com/Gzips/还是显示没有压缩
  后来想了想,是不是因为使用了伪静态的原因呢?
  查找相关资料,还真是这个原因,于是更改了以后,内容为:
  

<IIsCompressionSchemeLocation =&quot;/LM/W3SVC/Filters/Compression/deflate&quot;
HcCompressionDll=&quot;%windir%\system32\inetsrv\gzip.dll&quot;
HcCreateFlags=&quot;0&quot;
HcDoDynamicCompression=&quot;TRUE&quot;
HcDoOnDemandCompression=&quot;TRUE&quot;
HcDoStaticCompression=&quot;TRUE&quot;
HcDynamicCompressionLevel=&quot;9&quot;
HcFileExtensions=&quot;htm
html
txt
js
css
swf
xml&quot;
HcOnDemandCompLevel=&quot;9&quot;
HcPriority=&quot;1&quot;
HcScriptFileExtensions=&quot;asp
html
aspx
dll
exe&quot;
>
</IIsCompressionScheme>
<IIsCompressionSchemeLocation =&quot;/LM/W3SVC/Filters/Compression/gzip&quot;
HcCompressionDll=&quot;%windir%\system32\inetsrv\gzip.dll&quot;
HcCreateFlags=&quot;1&quot;
HcDoDynamicCompression=&quot;TRUE&quot;
HcDoOnDemandCompression=&quot;TRUE&quot;
HcDoStaticCompression=&quot;TRUE&quot;
HcDynamicCompressionLevel=&quot;9&quot;
HcFileExtensions=&quot;htm
html
txt
js
css
swf
xml&quot;
HcOnDemandCompLevel=&quot;9&quot;
HcPriority=&quot;1&quot;
HcScriptFileExtensions=&quot;asp
html
aspx
dll
exe&quot;
>
</IIsCompressionScheme>
  
  



在动态压缩的字段里添加html,增加以后测试结果为压缩:  http://blog.iyunv.com/aigoChina/article/details/

页: [1]
查看完整版本: IIS开启伪静态的GZip压缩