特定のページで GZip を無効にしたい。これは にありますが、にアクセス.htaccess
すると GZip がオン ( Content-Encoding: gzip
) になりdashboard/index
ます。
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI /dashboard/index no-gzip dont-vary
Header set MyHeader %{REQUEST_URI}
が何であるかを確認するために追加しようとしRequest_URI
ましたが、内部サーバーエラーが発生しました。
dashboard/index
、、、などdashboard/index.*
の正規表現も試してみましたが、GZip はまだ有効でした。"/dashboard/index"
SetEnvIfNoCase REQUEST_URI ...
コメント#AddOutputFilterByType
すると、GZip がオフになります。
私は Apache 2.4.16、Yii 2.0.7、PHP を使用しています。私は本番環境で FPM を使用しているため、apache_setenv()
利用できません。