mod_deflate together with mod_rewrite ?

Discussion in 'Server Operation' started by saigon, Dec 29, 2006.

  1. saigon

    saigon New Member

    I would like to ask for help with the following simple problem - running together mod_rewrite and mod_deflate

    with the .htaccess configuration like this (on Apache 2.2.0):

    RewriteEngine On
    RewriteBase /tmp2
    RewriteRule ^index.html$ index.php
    SetOutputFilter DEFLATE

    I get the request on index.php with compressed content-encoding,
    but request on index.html is not compressed at all.
    I was playing with order of directives and order of modules declaration in the apache config, but with no success and no idea how to fix this.

    ???

    thanks for any helpfull idea
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you add this to your configuration?
    Code:
    DeflateFilterNote Input input_info
    DeflateFilterNote Output output_info
    DeflateFilterNote Ratio ratio_info
    LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
    CustomLog /var/log/apache2/deflate_log deflate
    What gets logged to /var/log/apache2/deflate_log then?
     
  3. saigon

    saigon New Member

    After adding the debug info, I am recieving:

    "GET /index.php HTTP/1.1" 200 12/47 (25%)
    "GET /index.html HTTP/1.1" 200 -/- (-%)

    :-(
     
  4. falko

    falko Super Moderator ISPConfig Developer

    index.php isompressed which is fine. index.html isn't compressed because it isn't delivered to the browser because of your rewrite rule:

    RewriteRule ^index.html$ index.php

    If someone requests index.html, index.php gets delivered. So everything is as it should be. :)
     

Share This Page