WhatsMyIP.org Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
November 20, 2009, 06:34:48 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
SMF - Just Installed!
351
Posts in
87
Topics by
171
Members
Latest Member:
hampton1811
WhatsMyIP.org Forum
WhatsMyIP Site Tools
mod_gzip
Enable gzip on plain HTML or SHTML index
« previous
next »
Pages:
[
1
]
Author
Topic: Enable gzip on plain HTML or SHTML index (Read 299 times)
webgraf
Newbie
Awesome Points: +0/-0
Posts: 2
Enable gzip on plain HTML or SHTML index
«
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
Re: Enable gzip on plain HTML or SHTML index
«
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
PixelAds!
♦
Restaurant Menus
♦
Mac Repair Boston
♦
WhatsMyIP
♦
IPSite
♦
Random Websites
webgraf
Newbie
Awesome Points: +0/-0
Posts: 2
Re: Enable gzip on plain HTML or SHTML index
«
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
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Networking
-----------------------------
=> Hardware Networking
=> OS Networking
=> Application Networking
=> How Do I Configure My Router?
=> Security Issues
-----------------------------
Stuff
-----------------------------
=> Suggestions
=> Talk
=> Don't Use MSIE
-----------------------------
WhatsMyIP Site Tools
-----------------------------
=> Port Scanner
=> Traceroute
=> mod_gzip
=> Ping
=> Whois & DNS
=> More Info
=> Website Ranking
=> HTML Special Characters
=> String to Timestamp
=> Hash Generator
=> Text Case Changer
=> Regexp Tester
=> String Encoding
=> Password Generator
=> Roman Numerals
=> Upside-Down Text
=> Chase Your Spam
=> iPod RX-8 Install
=> Magellan GPS
=> AppleScript
=> iTunes Web Remote
=> Homemade iPhone Ringtones
=> Unit Converter
=> Statistical Accuracy
=> PixelAds
Loading...