Bottyz Posted April 13, 2010 Share Posted April 13, 2010 Hey all, (I'm not 100% sure this is the right place for this request, so sorry if it needs moving). I want to be able to prepend and append php files with gzip compression code. However, the problem i have is that i want to be able to exclude certain php pages from this. The current code in my .htaccess is this: php_value auto_prepend_file begin_gzip.php php_value auto_append_file end_gzip.php Which obviously compresses all php files. The begin_gzip.php is as follows: <?php ob_start("ob_gzhandler"); ?> and the end_gzip.php is: <?php ob_flush(); ?> The pages i want to exclude contain php download scripts which stop working with the compression enabled. So is there a way to exclude these files by name or am i going to have to add the begin/end code to each individual page i want to compress? Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/198398-gzip-compression-exclude-certain-files/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.