nivekau

Well-Known Member
Jul 22, 2011
51
4
58
Australia
cPanel Access Level
Root Administrator
If I enable Optimize Website for select MIME types in cpanel, does it just add something like the following to the .htaccess files in that account;

<IfModule mod_deflate.c>
<filesMatch "\.(html|php|js|css)$">
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>

Or does it do more than this?

Also, how can I check whether mod_deflate is enabled?
And how do I set the server to cache the gzip files?
 

Eminds

Well-Known Member
Nov 10, 2016
319
32
28
India
cPanel Access Level
Root Administrator
If you have root access of your Cpanel server then use the below command and it will show you the results of mod_deflate

[root ~ ]# httpd -M | grep deflate
deflate_module (static)
[root ~ ]#
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,243
463
Hello,

Yes, using this feature simply populates the default settings to the .htaccess file in account's home directory. The following thread should help if you want to verify compression is working:

Compression not working

Information on the additional options available if you'd like to customize the entries in the .htaccess file is available at:

mod_deflate - Apache HTTP Server Version 2.4

Thank you.