Magento 提速的优化方法1

如何解决呢?其实很多的主机都已经默认安装一个组件:GZIP。我们就是要通过修改它来提高MAGENTO的运行速度。


现在我们为MAGENTO开启GZIP比较方便的方法是修改根目录下.htaccess 文件。我们只需要去掉一些注释就可以了。


在根目录.htaccess找到和以下代码相似的代码,并且把代码修改得和下面一模一样。(去掉前面的#符号。)


############################################
## enable apache served files compression
##http://developer.yahoo.com/performance/rules.html#gzip

# Insertfilter
SetOutputFilter DEFLATE

# Netscape 4.x hassome problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4.0[678] no-gzip

# MSIE masqueradesas Netscape, but it is fine
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
# Don’t compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzipdont-vary

# Make sure proxiesdon’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

 

另外还有下面这一段:

############################################
## enable resulting html compression

php_flagzlib.output_compression on

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值