Skip to main content

.htaccess Map extensions to media types

Map extensions to media types

Map the following filename extensions to the specified encoding type using AddEncoding so Apache can serve the file types with the appropriate Content-Encoding response header.

note

This will not make Apache compress them!

If these files types were served without an appropriate Content-Encoding response header, client applications (for example browsers) wouldn't know that they first need to uncompress the response, and thus, wouldn't be able to understand the content.

For example:

<IfModule mod_deflate.c>
<IfModule mod_mime.c>
AddEncoding gzip svgz
</IfModule>
</IfModule>