OSDN Git Service

Web: Use GZIP compression from PHP for CSS files too
authorTim Gerundt <tim@gerundt.de>
Fri, 23 Apr 2010 10:10:21 +0000 (10:10 +0000)
committerTim Gerundt <tim@gerundt.de>
Fri, 23 Apr 2010 10:10:21 +0000 (10:10 +0000)
Web/.htaccess
Web/engine/css/print.css
Web/engine/css/screen.css

index 457785b..06e49ff 100644 (file)
@@ -37,6 +37,10 @@ ErrorDocument 404 /404.php
 #Use PHP5 instead of PHP4
 AddType x-mapp-php5 .php
 
+#Use PHP5 for CSS files
+AddType x-mapp-php5 .css 
+#AddType application/x-httpd-php .css 
+
 #Redirect PAD download URL to current WinMerge version...
 Redirect permanent /downloads/WinMerge-Setup.exe http://downloads.sourceforge.net/winmerge/WinMerge-2.12.4-Setup.exe
 
index e653dc3..cda516c 100644 (file)
@@ -1,3 +1,7 @@
+<?php
+ob_start('ob_gzhandler'); //Use GZIP compression from PHP, since 1and1 don't support it from Apache!
+header('Content-type: text/css');
+?>
 body {
        margin: 0;
        padding: 0;
index abfaaa2..3cc7fe0 100644 (file)
@@ -1,3 +1,7 @@
+<?php
+ob_start('ob_gzhandler'); //Use GZIP compression from PHP, since 1and1 don't support it from Apache!
+header('Content-type: text/css');
+?>
 body {
        margin: 0;
        padding: 0;