搜索 Location ="/LM/W3SVC/Filters/Compression/gzip"
仔細核對下代碼:
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="0"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="FALSE"
HcDynamicCompressionLevel="0"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
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="0"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="asp
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="10"
HcFileExtensions="html
css
js
htm
xml
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="php
dll"
>
</IIsCompressionScheme>
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compression/deflate"
HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
HcCreateFlags="2"
HcDoDynamicCompression="TRUE"
HcDoOnDemandCompression="TRUE"
HcDoStaticCompression="TRUE"
HcDynamicCompressionLevel="10"
HcFileExtensions="html
css
js
htm
xml
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="php
dll"
>
</IIsCompressionScheme>
2、網站IP gzip檢測成功 域名確沒有檢測到gzip,我用的是centos vps 在kloxo控制面板里設置的
首先確認下程序裡面開啟了gzip功能,如果是知名的程序,那麼查看下程序商內的官方網站容或論壇。
由於VPS使用了kloxo面板,所以也要檢查一下伺服器是否開啟。
進入 PHP Config 裡面,把 Output Compression 前面打上鉤。
然後重啟httpd服務,至此Gzip開啟成功。
希望我的回答對你有所幫助。
3、VPS原來開啟GZIP壓縮的,但是發現對收錄不好,不知道取消GZIP會不會因頁面過大被K站
GZIP,理論上不影響網站seo,但在實際操作過程中,由於程序的關系,開啟了gzip,還是會影響seo的,特別是收錄量提高不起來,經本人幾個網站測試,關了gzip,明顯收錄量大增。
4、雲伺服器VPS如何啟用網頁Gzip壓縮步驟
Apache開啟GZIP要看查看是否已經開啟mod_deflate模塊,如果沒有則需要先載入,在配置文件httpd.conf中將
LoadMole deflate_mole moles/mod_deflate.so
LoadMole headers_mole moles/mod_headers.so
前面的#號去掉。DNSLA建議,如果對apache的配置文件不太懂的客戶在修改配置文件之前對配置文件進行備份。
開啟模塊後,在httpd.conf配置文件的最下面空白處添加一下內容:
<ifmole mod_deflate.c>
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:pdf|mov|avi|mp3|mp4|rm)$ no-gzip dont-vary
DeflateCompressionLevel 6
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/x-httpd-php
AddOutputFilter DEFLATE js css
</ifmole>