The method was this:
- In the root of the web edit file .htaccess. It should contain the following:
- The CSS for some reason had to be done differently. In an htaccess file in a CSS ONLY directory.
AddHandler application/x-httpd-php .css php_value auto_prepend_file gzip-css.php php_flag zlib.output_compression On
- Additionally put a file called gzip-css.php in that directory. It’s contents:
ob_start ("ob_gzhandler"); header ("content-type: text/css; charset: UTF-8"); header ("cache-control: must-revalidate"); $offset = 60 * 60; $expire = "expires: " . gmdate ("D, d M Y H:i:s", time() + $offset) . " GMT"; header ($expire); ?>
Ok, so that ended up compressing all of the files I needed. JS, CSS and PHP. So now, why doesn’t it work in BlueHost??