如何在 apache2 中禁用 mod_deflate? [英] How to disable mod_deflate in apache2?
本文介绍了如何在 apache2 中禁用 mod_deflate?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 Apache2 中禁用 mod_deflate
How can I disable mod_deflate in Apache2
- 对于特定目录中的文件
或
- 对于所有扩展名为 .py 的文件?
推荐答案
您可以设置 该目录/文件类型的环境变量no-gzip:
You could set the environment variable no-gzip for that directory/type of file:
# for URL paths that begin with "/foo/bar/"
SetEnvIf Request_URI ^/foo/bar/ no-gzip=1
# for files that end with ".py"
<FilesMatch \.py$>
SetEnv no-gzip 1
</FilesMatch>
这篇关于如何在 apache2 中禁用 mod_deflate?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文