0N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
0N/A<
TITLE>Apache module mod_headers</
TITLE>
0N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) --> 0N/A<
H1 ALIGN="CENTER">Module mod_headers</
H1>
0N/A<
p>This module provides for the customization of HTTP
0N/A><
STRONG>Status:</
STRONG></
A> Extension
1879N/A><
STRONG>Module Identifier:</
STRONG></
A> headers_module
1879N/AThis module provides a directive to control the sending of HTTP
1879N/Aheaders. Headers can be merged, replaced or removed.
2073N/A<
LI><
A HREF="#header">Header</
A>
0N/A<
H2><
A NAME="header">Header</
A> directive</
H2>
0N/A><
STRONG>Syntax:</
STRONG></
A> Header [ set | append | add ]
0N/A <
EM>header</
EM> <
EM>value</
EM><
BR>
0N/A><
STRONG>Syntax:</
STRONG></
A> Header unset <
EM>header</
EM><
BR>
2062N/A><
STRONG>Override:</
STRONG></
A> FileInfo<
BR>
2062N/A><
STRONG>Status:</
STRONG></
A> Extension<
BR>
2062N/A><
STRONG>Module:</
STRONG></
A> mod_header<
P>
2062N/AThis directive can replace, merge or remove HTTP response headers. The
2062N/Aaction it performs is determined by the first argument. This can be one
2062N/A<
LI><
STRONG>set</
STRONG><
BR>
113N/A The response header is set, replacing any previous header with this name
0N/A<
LI><
STRONG>append</
STRONG><
BR>
0N/A The response header is appended to any existing header of the same
0N/A name. When a new value is merged onto an existing header it is
0N/A separated from the existing header with a comma. This is the HTTP standard
0N/A way of giving a header multiple values.
431N/A<
LI><
STRONG>add</
STRONG><
BR>
113N/A The response header is added to the existing set of headers, even if
518N/A this header already exists. This can result in two (or more) headers
518N/A having the same name. This can lead to unforeseen consequences, and in
0N/A general "append" should be used instead.
0N/A<
LI><
STRONG>unset</
STRONG><
BR>
0N/A The response header of this name is removed, if it exists. If there are
0N/A multiple headers of the same name, all will be removed.
1833N/AThis argument is followed by a header name, which can include the
1833N/Afinal colon, but it is not required. Case is ignored. For
431N/Aadd, append and set a value is given as the third argument. If this
726N/Avalue contains spaces, it should be surrounded by double quotes.
431N/AFor unset, no value should be given.
431N/A<
H3>Order of Processing</
H3>
431N/AThe Header directive can occur almost anywhere within the server
431N/Aconfiguration. It is valid in the main server config and virtual host
431N/Asections, inside <Directory>, <Location> and <Files>
431N/Asections, and within .htaccess files.
0N/AThe Header directives are processed in the following order:
1833N/A<
LI><Directory> sections and .htaccess
2062N/AOrder is important. These two headers have a different effect if reversed:
2062N/AHeader append Author "John P. Doe"
2062N/AThis way round, the Author header is not set. If reversed, the Author
2062N/Aheader is set to "John P. Doe".
2062N/AThe Header directives are processed just before the response is sent
2062N/Aby its handler. These means that some headers that are added just
2062N/Abefore the response is sent cannot be unset or overridden. This
2062N/Aincludes headers such as "Date" and "Server".