Hrm, interesting. I can't reproduce this:
[root@dev ~]# cat /etc/httpd/conf.d/test.conf<FilesMatch "\.txt$"> SetOutputFilter DEFLATE Header set X-Ping "Pong"</FilesMatch>[root@dev ~]# GET -SedH 'Accept-Encoding: gzip, deflate''http://localhost/test.txt'GET http://localhost/test.txt --> 200 OKContent-Encoding: gzipContent-Length: 2449X-Ping: Pong[root@dev ~]# GET -SedH 'Accept-Encoding: gzip, deflate''http://localhost/test.txt?foo'GET http://localhost/test.txt?foo --> 200 OKContent-Encoding: gzipContent-Length: 2449X-Ping: Pong
(unrelated headers removed)
As mentioned above, FilesMatch
matches filesystem paths, not URIs. Are the resources that aren't being compressed files on the filesystem or are they generated on the fly, or proxied, or redirected or something else that breaks direct URI-to-filesystem mapping? You could try using LocationMatch instead, which is probably a better bet anyway if any part of your app isn't static files.
<IfModule mod_deflate.c><LocationMatch "\.(css|js|x?html?|php)$"> SetOutputFilter DEFLATE</LocationMatch></IfModule>