Using mod_rewrite to avoid sending compressed css and js to IE prior to SP2

Discussion in 'Apache' started by ra_y_mon, Apr 29, 2010.

  1. #1
    We are 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 us translate those ISAPI rules to APACHE mod_rewrite?

    Our objective is to avoid sending compressed css and js when the user has an XP version prior to SP2, since apparently there is a bug that prevents systems under SP1 to read the gzipped CSSs. Our website ( http://www.buscounviaje.com ) works fine for most browsers, but those running IE under XP SP1 do not visualize it correctly (CSSs are not applied: white page with black letters).

    The rules we are trying to 'translate' from ISAPI to Apache mod_rewrite are:

    RewriteCond %{HTTP:User-Agent} MSIE\ [56]
    RewriteCond %{HTTP:User-Agent} !SV1
    RewriteCond %{REQUEST_URI} \.(css|js)$
    RewriteHeader Accept-Encoding: .* $1
    Code (markup):
    Thanks a lot... We will appreciate any help, this problem is driving us crazy... If somebody knows another way of solving our problem (compressed CSSs and JSs for IE users under SP1), we will be grateful.

    Best, Ramon
     
    ra_y_mon, Apr 29, 2010 IP