IIS开启伪静态的GZip压缩

今天,开通了自己的网站www.lovemu.com.cn

根据http://www.cnblogs.com/zhangziqiu/archive/2009/05/17/gzip.html

试了下开启Gzip压缩,可是检测之后http://tool.chinaz.com/Gzips/还是显示没有压缩

后来想了想,是不是因为使用了伪静态的原因呢?

查找相关资料,还真是这个原因,于是更改了以后,内容为:

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


在动态压缩的字段里添加 html,增加以后测试结果为压缩:



你可能感兴趣的:(GZip,伪静态,IIS)