WhatsMyIP.org Forum
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2009, 06:34:48 PM

Login with username, password and session length
Search:     Advanced search
SMF - Just Installed!
351 Posts in 87 Topics by 171 Members
Latest Member: hampton1811
* Home Help Search Login Register
+  WhatsMyIP.org Forum
|-+  WhatsMyIP Site Tools
| |-+  mod_gzip
| | |-+  Enable gzip on plain HTML or SHTML index
« previous next »
Pages: [1] Print
Author Topic: Enable gzip on plain HTML or SHTML index  (Read 299 times)
webgraf
Newbie
*

Awesome Points: +0/-0
Posts: 2


View Profile
« on: October 16, 2009, 12:24:12 AM »

I tested my php sites with your code <? ob_start("ob_gzhandler"); ?> and it works fine!
Is there a way force html files to gzip onfly, or I have to gzip and unzip every time I make some changes on page?
Thanks.
Logged
l008com
Administrator
Full Member
*****

Awesome Points: +1/-0
Posts: 151


View Profile WWW
« Reply #1 on: October 22, 2009, 11:49:15 PM »

Your question confuses me. If you are using the php code, then you are gzip'ing on the fly. If you manually gzip the file, then it won't work at all with the php code.
Logged

webgraf
Newbie
*

Awesome Points: +0/-0
Posts: 2


View Profile
« Reply #2 on: October 29, 2009, 01:34:51 AM »

Hello, I find solution to my question and this is it (put it in .htaccess file if you have mod_deflate enabled on server)

<IfModule mod_deflate.c>
<FilesMatch "\.(js|css|html|shtml|php)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>

It compress html,  js, css, shtml but won't work with php files! So I have to combine it with  <? ob_start("ob_gzhandler"); ?>  on my index.php and it works fine in firefox, safari...but I have some problems with IE 7 on PC. It seams that IE 7 goes to quirks mode and I have "show" with CSS layout because IE7 does not allow comment before doctype. So I search for solution that this (htacess) works for php files too.
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!