MyBB Community Forums

Full Version: Change name of global.css to global.css.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to enable gzip on global.css, for that I want to change name for it to global.css.php, how to do that?
Don't.

It's better to have global.css not gzipped than do the hacks you are failing miserably to do.
Minified global.css --> Done. But with gzip it can be:

Actual Page Size: 13 KB
Size if Gzipped: 3.09 KB
Yes and that's all very nice if your server supports it. If it doesn't - do yourself a favor and find a better web host. It's a standard feature very much like URL rewrites.
I've gziped my css files (other than form's one) by using this method:-
<?php if(extension_loaded('zlib')){ob_start('ob_gzhandler');} header("Content-type: text/css"); ?>

/* css codes */

<?php if(extension_loaded('zlib')){ob_end_flush();}?>
But this needs to change their name from style.css to style.css.php. So There have to be a way to compress global.css