I'm trying to implement a poor man's substitute to mod_gzip since my provider refuses to turn it on, and I'm having some problems doing it with mod_rewrite. I saved my scripts in the scripts directory. I put gz-compressed copies in the scripts/compressed directory.

I've found that when I request the script directly, I get the compressed file; but when the browser requests it through my page in /, I get the original uncompressed script. The addresses used in both are exactly the same.

I can't believe it. After fighting htaccess for at least five hours now, I finally found the code that will work. It looks like the gzip line was the problem. I don't know why the way it's requested makes a difference, but I'm just glad it's working.