2.3.19 AddEncoding
AddEncoding specifies the association between the compression format and the extension necessary for the web browser to display the compressed data on the web server.
Description
AddEncoding specifies the association between the compression format and the extension necessary for the web browser to display the compressed data on the web server. Specify this directive to send the Content-Encoding header, which contains information about decompression of the compressed file, from the web server to the web browser. The use of this header depends on the web browser implementation. If you specify this directive more than once, you cannot specify different compression formats for the same extension.
Syntax
AddEncoding compression_format extension
Locations where it can be written
httpsd.conf, <VirtualHost>, <Directory>, and .htaccess
Overwrite permission
FileInfo level
Example
AddEncoding x-compress Z ...1. AddEncoding x-gzip gz ...2.
-
If the file extension is Z, the compression format is x-compress.
-
If the file extension is gz, the compression format is x-gzip.