您好,万网共享虚拟主机和独享虚拟主机(原轻云服务器)均已经开启了压缩模块。如果使用第三方检测工具,检测到未网站未被压缩。
可能的原因是:某些类型的文件未设置压缩、一些旧主机默认未开启压缩
解决方法:在.htaccess文件中设置压缩的文件类型,例如添加常见的文件类型压缩:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE image/svg+xml