Character sets and languages
@@ -232,8 +232,8 @@ module="mod_mime_magic">MimeMagicFile
render the information.
- Content-Language: en, fr
- Content-Type: text/plain; charset=ISO-8859-1
+Content-Language: en, fr
+Content-Type: text/plain; charset=ISO-8859-1
The language specification is the two-letter abbreviation
@@ -263,10 +263,12 @@ charset
extension.
Example
- AddLanguage ja .ja
- AddCharset EUC-JP .euc
- AddCharset ISO-2022-JP .jis
- AddCharset SHIFT_JIS .sjis
+
+AddLanguage ja .ja
+AddCharset EUC-JP .euc
+AddCharset ISO-2022-JP .jis
+AddCharset SHIFT_JIS .sjis
+
Then the document xxxx.ja.jis will be treated
@@ -310,8 +312,10 @@ type
extension.
Example
- AddEncoding x-gzip .gz
- AddEncoding x-compress .Z
+
+AddEncoding x-gzip .gz
+AddEncoding x-compress .Z
+
This will cause filenames containing the .gz extension
@@ -359,9 +363,9 @@ handler
activate CGI scripts with the file extension .cgi, you
might use:
-
+
AddHandler cgi-script .cgi
-
+
Once that has been put into your httpd.conf file, any file containing
the .cgi extension will be treated as a CGI program.
@@ -431,9 +435,11 @@ language
extension.
Example
- AddEncoding x-compress .Z
- AddLanguage en .en
- AddLanguage fr .fr
+
+AddEncoding x-compress .Z
+AddLanguage en .en
+AddLanguage fr .fr
+
Then the document xxxx.en.Z will be treated as
@@ -449,11 +455,11 @@ language
extension, the last one encountered is the one that is used.
That is, for the case of:
-
- AddLanguage en .en
- AddLanguage en-gb .en
- AddLanguage en-us .en
-
+
+AddLanguage en .en
+AddLanguage en-gb .en
+AddLanguage en-us .en
+
documents with the extension .en would be treated as
being en-us.
@@ -494,9 +500,9 @@ later.
.shtml files for server-side includes and will then
compress the output using mod_deflate.
-
+
AddOutputFilter INCLUDES;DEFLATE shtml
-
+
If more than one filter is specified, they must be separated
by semicolons in the order in which they should process the
@@ -514,34 +520,26 @@ later.
the AddOutputFilter
directive.
-
- # Effective filter "DEFLATE"
- AddOutputFilter DEFLATE shtml
- <Location /foo>
-
- # Effective filter "INCLUDES", replacing "DEFLATE"
- AddOutputFilter INCLUDES shtml
-
- </Location>
- <Location /bar>
-
- # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE"
- AddOutputFilter INCLUDES;DEFLATE shtml
-
- </Location>
- <Location /bar/baz>
-
- # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE"
- AddOutputFilter BUFFER shtml
-
- </Location>
- <Location /bar/baz/buz>
-
- # No effective filter, replacing "BUFFER"
- RemoveOutputFilter shtml
-
- </Location>
-
+
+# Effective filter "DEFLATE"
+AddOutputFilter DEFLATE shtml
+<Location /foo>
+ # Effective filter "INCLUDES", replacing "DEFLATE"
+ AddOutputFilter INCLUDES shtml
+</Location>
+<Location /bar>
+ # Effective filter "INCLUDES;DEFLATE", replacing "DEFLATE"
+ AddOutputFilter INCLUDES;DEFLATE shtml
+</Location>
+<Location /bar/baz>
+ # Effective filter "BUFFER", replacing "INCLUDES;DEFLATE"
+ AddOutputFilter BUFFER shtml
+</Location>
+<Location /bar/baz/buz>
+ # No effective filter, replacing "BUFFER"
+ RemoveOutputFilter shtml
+</Location>
+
RemoveOutputFilter
SetOutputFilter
@@ -573,13 +571,17 @@ type
Example
+
AddType image/gif .gif
+
Or, to specify multiple file extensions in one directive:
Example
+
AddType image/jpeg jpeg jpg jpe
+
The extension argument is case-insensitive and can
@@ -594,7 +596,9 @@ type
qs:
Example
- Addtype application/rss+xml;qs=0.8 .xml
+
+ AddType application/rss+xml;qs=0.8 .xml
+
This is useful in situations, e.g. when a client
@@ -658,9 +662,9 @@ a matching file with MultiViews
and filters to participate in Multviews, but will exclude unknown
files:
-
+
MultiviewsMatch Handlers Filters
-
+
MultiviewsMatch is not allowed in a
Location or
Content-Language header field will be generated.
Example
+
DefaultLanguage en
+
mod_negotiation
@@ -725,7 +731,9 @@ components as part of the filename
This directive is recommended when you have a virtual filesystem.
Example
+
ModMimeUsePathInfo On
+
If you have a request for /index.php/foo.shtml
@@ -764,7 +772,9 @@ later.
be specified with or without a leading dot.
Example
+
RemoveCharset .html .shtml
+
@@ -787,13 +797,13 @@ extensions
server config files. An example of its use might be:
/foo/.htaccess:
- AddEncoding x-gzip .gz
- AddType text/plain .asc
- <Files *.gz.asc>
-
- RemoveEncoding .gz
-
- </Files>
+
+AddEncoding x-gzip .gz
+AddType text/plain .asc
+<Files *.gz.asc>
+ RemoveEncoding .gz
+</Files>
+
This will cause foo.gz to be marked as being
@@ -830,11 +840,15 @@ extensions
config files. An example of its use might be:
/foo/.htaccess:
+
AddHandler server-parsed .html
+
/foo/bar/.htaccess:
+
RemoveHandler .html
+
This has the effect of returning .html files in
@@ -922,7 +936,9 @@ later.
be specified with or without a leading dot.
Example
+
RemoveOutputFilter shtml
+
AddOutputFilter
@@ -947,7 +963,9 @@ extensions
might be:
/foo/.htaccess:
+
RemoveType .cgi
+
This will remove any special handling of .cgi
diff --git a/docs/manual/mod/mod_mime_magic.xml b/docs/manual/mod/mod_mime_magic.xml
index 0c40c38fb01..bd79868a4e2 100644
--- a/docs/manual/mod/mod_mime_magic.xml
+++ b/docs/manual/mod/mod_mime_magic.xml
@@ -264,7 +264,9 @@ using the specified magic file
server's file.
Example
+
MimeMagicFile conf/magic
+