No, not okay. There are a lot of things wrong. Enable, do not die after redirection, not considering the descent method, ...
This is very easy to do with PHP, since the zlib output handler automatically detects the appropriate compression to send to the client (if any); all you have to do is enable it:
<?php if (extension_loaded("zlib") && (ini_get("output_handler") != "ob_gzhandler")) { ini_set("zlib.output_compression", 1); } readfile('style.css');
Artefacto
source share