purpler
New Member
- Messages
- 13
- Reaction score
- 0
- Points
- 0
Hi, i need to know hat is the best way to compress the HTTP traffic via .htaccess.
I tried:
- Gives me Error 500
- Gives me Error 500
- Seems to not work, tested with several online gzip check services.
- Seems to not work
Only thing that worked is to handle all HTML files by PHP:
#put this in .htaccess
#put this before any code in every HTML page:
Please help me and clear up a bit what is the best working solution here at x10hosting.com and generally!
Thanks in advance!
I tried:
Code:
php_flag zlib.output_compression On
Code:
php_value zlib.output_compression On
Code:
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>
Code:
SetOutputFilter DEFLATE
Only thing that worked is to handle all HTML files by PHP:
#put this in .htaccess
Code:
AddHandler application/x-httpd-php5 .html
#put this before any code in every HTML page:
Code:
<?php ob_start( 'ob_gzhandler' );?>
Please help me and clear up a bit what is the best working solution here at x10hosting.com and generally!
Thanks in advance!