Last active
November 24, 2023 02:45
-
-
Save jjrom/c8fbf291d56287753777 to your computer and use it in GitHub Desktop.
Enable compression on Apache server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this to apache configuration file (not in .htaccess !) | |
<Location /> | |
SetOutputFilter DEFLATE | |
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary | |
SetEnvIfNoCase Request_URI \.(?:mp3|wav|wma|au|m4p|snd|mid|wmv|mpg|mpeg|mp4|qt|mov)$ no-gzip dont-vary | |
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary | |
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|gz2|sit|rar)$ no-gzip dont-vary | |
</Location> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment