I have this simple .htaccess in a hosted website. Static content is
compressed, but content coming from FastCGI (that's a Rails
application) is not. Dynamic content has the right MIME type and
everything, see
$ wget -S --header="Accept-Encoding: gzip" http://www.hashref.com/
--11:27:25-- http://www.hashref.com/
=> `index.html'
Resolving www.hashref.com... 208.97.178.117
Connecting to www.hashref.com|208.97.178.117|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Sun, 07 Jan 2007 10:27:28 GMT
Server: Apache/2.0.54 (Unix) PHP/4.4.2 mod_ssl/2.0.54 OpenSSL/
0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Set-Cookie: _session_id=1986937c4c9750a1f7b4dacc89168a11; path=/
Cache-Control: no-cache
Content-Length: 4837
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
Length: 4,837 (4.7K) [text/html]
Should that configuration work?
-- fxn
# General Apache options
AddHandler fastcgi-script .fcgi
RewriteEngine On
# Rewrite rules to get to Analog stats in DreamHost
RewriteBase /
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]
# There are links to the old img directory out there, redirect
# those requests to the current images and projects directories .
RewriteRule ^img/(.*)$ images/$1 [L,R]
RewriteRule ^prj/(.*)$ projects/$1 [L,R]
# Forward dynamic requests to dispatch.fcgi.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
# Deflate
AddOutputFilterByType DEFLATE text/html text/css application/x-
javascript text/plain
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]