Antwort: Re: Antwort: [Mod_gzip] mod_gzip and mod_bandwidth.

mod_gzip@lists.over.net mod_gzip@lists.over.net
Fri, 15 Aug 2003 11:19:15 +0200


Hi,


> How did you that?
> I have added to the .htaccess file:
> <IfModule mod_gzip.c>
> mod_gzip_on no
> </IfModule>
>
> But then I receive a "Internal Server Error" when loading
> the page and the error_log file says:
> [Thu Aug 14 20:11:57 2003] [alert] [client 127.0.0.1]
> /home/nacho/public_html/japones/.htaccess: mod_gzip_on not allowed here

surprise.
It works for me (Apache 1.3.28, mod_gzip 1.3.26.1a).

But then, I didn't use "<IfModule>" inside the .htaccess
file, but just "mod_gzip_on no".

> So it seems that it doesn't allow .htaccess control.

That is what the error message looks like - but I don't
think this is really the case, although the only Apache
code section that would output this string is
     main/http_config.c: invoke_cmd (line 822)

IMHO the mod_gzip code doesn't contain any restriction
about in which context the directives are valid.

It shouldnn't even depend on any specific "AllowOverride"
setting (which is something that makes mod_gzip less
usable for mass providers - just to note that here -
because the provider isn't able to control whether
mod_gzip is to be used by a specific customer or not).

But to be sure about this, you might try again after
setting "AllowOverride All" in your httpd.conf (which
I did for my local test).

I just double checked that "<IfModule>" is valid in
.htaccess, so that's not the reason either ...

Anyway, mod_gzip can only work if it is the last module
loaded into Apache, because only then it will get control
over each and every request and response.

Regards, Michael