使用 Apache mod_rewrite 禁用 IE SP2 之前的压缩
我正在尝试复制此修复( http://sebduggan. com/posts/ie6-gzip-bug-solved-using-isapi-rewrite )与 Apache mod_rewrite,但没有成功...有人可以帮我将这些 ISAPI 规则转换为 APACHE mod_rewrite 吗?我不知道如何“翻译”这些规则...
我的目标是当用户拥有 SP2 之前的 XP 版本时避免发送压缩的 css 和 js,因为存在一个错误,阻止 SP1 下的 IE6 和 7 读取我的网站 BuscoUnViaje.com 的 gzipped CSS
我试图“翻译”为 Apache mod_rewrite 的规则:
RewriteCond %{HTTP:User-Agent} MSIE\ [56]
RewriteCond %{HTTP:User-Agent} !SV1
RewriteCond %{REQUEST_URI} \.(css|js)$
RewriteHeader Accept-Encoding: .* $1
提前致谢...
I am trying to replicate this fix ( http://sebduggan.com/posts/ie6-gzip-bug-solved-using-isapi-rewrite ) with Apache mod_rewrite, but with no success... Can somebody help me translate those ISAPI rules to APACHE mod_rewrite? I don't know how to 'translate' those rules...
My objective is to avoid sending compressed css and js when the user has an XP version prior to SP2, since there is a bug that prevents IE6&7 under SP1 to read the gzipped CSSs of my website BuscoUnViaje.com
The rules I am trying to 'translate' to Apache mod_rewrite:
RewriteCond %{HTTP:User-Agent} MSIE\ [56]
RewriteCond %{HTTP:User-Agent} !SV1
RewriteCond %{REQUEST_URI} \.(css|js)$
RewriteHeader Accept-Encoding: .* $1
Thanks in advance...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
mod_rewrite 没有 RewriteHeader 指令,因此我将它与 mod_headers 结合使用以达到预期的结果:
希望它有帮助!
mod_rewrite has no RewriteHeader directive, so I used it in conjunction with mod_headers to achieve the desired result:
Hope it helps!