Announcement

Collapse
No announcement yet.

Cpanel error "Missing </FilesMatch>"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cpanel error "Missing </FilesMatch>"

    Hi,
    I am running WordPress in my cPanel and using following code in my .htaccess file:

    Code:
    <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>
    The error in cPanel log is:

    2016-01-02 09:32:25.889 [ERROR] [/***/public_html/.htaccess:63] Missing '</FilesMatch>'.

  • #2
    Hi Elliott,

    Each command needs to be on a line by itself:
    <ifModule mod_deflate.c>
    <filesMatch "\.(js|css)$">
    SetOutputFilter DEFLATE
    </filesMatch>
    </ifModule>
    The </filesMatch> was getting linked with the SetOutputFilter.

    Comment

    Working...
    X