M
M
MdaUZH2016-02-05 11:22:34
htaccess
MdaUZH, 2016-02-05 11:22:34

How to enable compression on the server?

Hello.
PageSpeed ​​says enable compression, how to implement it correctly?
In server settings enabled mod_deflate
in htaccess added:

<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>

now htaccess looks like this:
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>

RewriteEngine On

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

RewriteRule .* index.php [L]

But PageSpeed ​​still swears and says enable compression

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2016-02-05
@VladimirAndreev

1. is there mod_deflate?
2. Are these settings ignored in .htaccess files by Apache?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question