Each directive needs to be on a line by itself:
<ifModule mod_deflate.c>
<filesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
The </filesMatch>
was getting associated with the SetOutputFilter
.
题
I am using wordpress and using this code in my .htaccess :
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
<ifModule mod_deflate.c>
<filesMatch "\.(js|css)$"> SetOutputFilter DEFLATE </filesMatch>
</ifModule>
my error in cpanel log is:
2013-09-16 09:32:25.889 [ERROR] [/***/public_html/.htaccess:63] Missing '</FilesMatch>'.
my site is: 2nafare.com
解决方案
Each directive needs to be on a line by itself:
<ifModule mod_deflate.c>
<filesMatch "\.(js|css)$">
SetOutputFilter DEFLATE
</filesMatch>
</ifModule>
The </filesMatch>
was getting associated with the SetOutputFilter
.