Quantcast
Viewing all articles
Browse latest Browse all 3

Answer by Ben Williams for Why Apache doesn’t gzip css or js files which have parameters?

The $ at the end of your regular expression will match the end of the URL, so if there is anything after the file extension, it won't match. You could omit the $ but then it would match if there was a ".css" etc. anywhere in the URL. Something like the example below might be safer. This should match either ".css" at the end of URL, or ".css" followed by ?, some parameters, and then the end of the URL.

<IfModule mod_deflate.c><FilesMatch "\.(css|js|x?html?|php)($|\?.*$)">           SetOutputFilter DEFLATE</FilesMatch></IfModule>

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>