I have XAMPP with apache version 2.4.25 and PHP 5.6, then i enabled mod_deflate and mod_filter on httpd.conf in apache folder:
LoadModule deflate_module modules/mod_deflate.so
LoadModule deflate_module modules/mod_filter.so
I installed a new codeignter framework then write a .httaccess file in root folder like this:
RewriteEngine on
#RewriteBase /suli5
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
# compress text, html, javascript, css, xml:
SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE image/png
AddOutputFilterByType DEFLATE image/jpg
AddOutputFilterByType DEFLATE text/html
# DEFLATE NOT COMPATIBLE BROWERS
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
Restart apache then I want to verify if compression gzip is run, so i check on
curl -I -H"Accept-Encoding: gzip" http://localhost/nees/
, but there is still no
Content-Encoding: gzip
Only give me like this:
TP/1.1 200 OK
Date: Thu, 27 Jul 2017 03:26:00 GMT
Server: Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30
X-Powered-By: PHP/5.6.30
Set-Cookie: ci_session=vmbl2tgvt838hb9mlbrg226f4hu7j43u; expires=Thu, 27-Jul-2017 05:26:00 GMT; Max-Age=7200; path=/; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Type: text/html; charset=UTF-8
How to check if my mod_deflate is running well?