Enable GZIP compression in the .htaccess

2

I have enabled GZIP compression through the file .htaccess . Everything is fine when I do the tests with gtmetrix to the home page but when I do the tests to other options sections like this tells me that compression is not active.

.htaccess file

## COMPRESSING GZIP##
<IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE text/plain
    AddOutputFilterByType DEFLATE text/html
    AddOutputFilterByType DEFLATE text/xml
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml
    AddOutputFilterByType DEFLATE application/rss+xml
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>
## COMPRESSING GZIP##

<IfModule mod_rewrite.c>
    RewriteBase /mobile/
    RewriteEngine on

    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteCond %{SCRIPT_FILENAME} !-f


    RewriteRule ^home/?$ home.php [L,NC]

</IfModule>
    
asked by DevMaster732 07.04.2016 в 23:06
source

1 answer

0
RewriteRule ^(.*)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]
    
answered by 04.01.2018 в 11:34