新买的一款主机,各方面都满意,并在.htaccess中设置了Gzip压缩(mod_deflate.c)和网页缓存(mod_expires.c),但无意中发现,IE浏览器下,任何图片都不cahce,导致每次浏览网页都要重新载入,很慢,网上搜了一下,说是IE6 的对待Gzip的著名的Bug。那么我想知道:.htaccess中如何判断IE6,判断如果是IE6就把Gzip关了。.htaccess 中怎么写呢??????以下是我的.htaccess代码,供参考。<IfModule mod_deflate.c>
#压缩网页
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
AddOutputFilterByType DEFLATE font/truetype font/opentype
</IfModule><IfModule mod_expires.c>
ExpiresActive on
#缓存网页
<FilesMatch "index\.html|\.(gif|jpg|jpeg|png|ico|swf|js|css)$">
ExpiresDefault "access plus 15 days"
Header set Cache-Control "max-age=1296000,public"
</FilesMatch>
</IfModule>.htaccessheaderie
#压缩网页
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
AddOutputFilterByType DEFLATE font/truetype font/opentype
</IfModule><IfModule mod_expires.c>
ExpiresActive on
#缓存网页
<FilesMatch "index\.html|\.(gif|jpg|jpeg|png|ico|swf|js|css)$">
ExpiresDefault "access plus 15 days"
Header set Cache-Control "max-age=1296000,public"
</FilesMatch>
</IfModule>.htaccessheaderie
解决方案 »
- PHP怎样点击按钮 使得表格中的内容可以修改
- PhP时间语句出错if(date('H')>=23 && date('H')<=5)
- php5.3不支持dbase了吗?
- WAMP环境设置完成(感觉是完成),Localhost需要输入帐户和密码!!!求助!!
- 在调试一个上传文件并保存在数据库里的小程序,始终出现问题,向这里的大神请教!
- 在线等,高手们多多指教,php翻页函数问题!!!!!!!!!!!
- 求教一简单算法的实现
- 在mysql中存图片的存储路径好吗?
- 如何用一个超链接提交表单????
- 如何分割这个字符串?在线等。。。。
- $_SESSION=array()与session_unset()
- 百度百科的关键词链接是怎样实现的呢
至少也是 IE8 了