分享

写回答

发帖

[提问] godaddy是否支持gzip

GoDaddy GoDaddy 3323 人阅读 | 13 人回复

发表于 2009-9-6 22:15:44 | 显示全部楼层 |阅读模式

在.htaccess中加入了如下应用gzip的代码
  1. <ifModule mod_gzip.c>
  2.   mod_gzip_on Yes
  3.   mod_gzip_dechunk Yes
  4.   mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  5.   mod_gzip_item_include handler ^cgi-script$
  6.   mod_gzip_item_include mime ^text/.*
  7.   mod_gzip_item_include mime ^application/x-javascript.*
  8.   mod_gzip_item_exclude mime ^image/.*
  9.   mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  10. </ifModule>
复制代码
测试后无效,不知是我的代码有误还是godaddy不支持gzip

[ 本帖最后由 winight 于 2009-9-6 10:20 PM 编辑 ]

回答|共 13 个

winight

发表于 2009-9-6 22:19:36 | 显示全部楼层

http://help.godaddy.com/topic/74/article/4485
官网的帮助中说可以用如下的方式实现gzip压缩,
在网页的DOCTYPE之前加入如下代码.
  1. <?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
复制代码
但是每个页面都加上这行代码太繁琐,而且我也不知道css,js文件中能不能加上这行代码,谁比较懂,指导一下

add.c

发表于 2009-9-7 09:30:29 | 显示全部楼层

默认就是支持的

winight

发表于 2009-9-24 11:33:31 | 显示全部楼层

有谁用godaddy实现gzip压缩了,默认支持,但怎么使用呢

add.c

发表于 2009-9-24 11:50:36 | 显示全部楼层

在你程序里可以设置
http://bbs.idcspy.com/search.php?searchid=45&orderby=lastpost&ascdesc=desc&searchsubmit=yes

winight

发表于 2009-9-24 11:51:56 | 显示全部楼层

我用的pligg,设置了以后无效.试过各种办法都不行.有谁用godaddy实现gzip了吗,什么程序都行,麻烦讲解一下怎么实现的

[ 本帖最后由 winight 于 2009-9-24 11:54 AM 编辑 ]
RAKSmart

winight

发表于 2009-9-24 15:22:12 | 显示全部楼层

原帖由 add.c 于 2009-9-24 11:50 AM 发表
在你程序里可以设置
http://bbs.idcspy.com/search.php?searchid=45&orderby=lastpost&ascdesc=desc&searchsubmit=yes

搜索出来的主题没有一个解决办法啊,谁帮帮忙吧

winight

发表于 2009-9-24 23:37:29 | 显示全部楼层

发Email问了客服:
Issue : I know that Godaddy's linux hosting support Gzip.But I do not know how to use it.I try many ways.Like this:
http://help.godaddy.com/article/4485
It does not work.I also try to modify php.ini and .htaccess.But i failed.Can you tell me how to use gzip?

客服竟然这样回答:
Thank you for contacting Online Support. The instructions that you see in the help article you referenced are the correc instructions for using GZip. Unfortunately this is considered a 3rd party script. If you are able to get it to work properly we are not able to provide support or assistance for it. If you are having trouble, we recommend using your preferred search engine to search for troubleshooting tips.

Please let us know if we can assist you in any other way.


真的没人能解决这个问题吗

add.c

发表于 2009-9-25 10:01:46 | 显示全部楼层

在你程序里开启就行了 , 你让别人怎么帮你

winight

发表于 2009-9-25 18:24:17 | 显示全部楼层

我用的是pligg程序,开启了没有反应,而且有的程序没有开启gzip的选项.我只想问问有没有谁实现了gzip压缩,,想知道他是怎么实现的,参考一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则