Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to disable Apache gzip compression for some media files in .htaccess file

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 1.29k
    Comment on it

    This tutorial will help user learn how to disable the compression of files.This can be done by disabling apache gzip. For example let us say that we want to disable compression for mp3 files, which a client get as a response by hitting a particular url.We add the following rule in .htaccess file.

    <Directory /home/user/www>
    
        SetOutputFilter DEFLATE 
        SetEnvIfNoCase Request_URI \.mp3$ no-gzip dont-vary 
    </Directory>
    

    Now the server will disable the compression for mp3 files and also check if the browser cache is cleared before we test.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: