| Description: | Configure HTTP response headers |
| Syntax: | Header set|append|add|unset|echo header
-[value [env=[!]variable]] |
+[value] [env=[!]variable]
| Context: | server config, virtual host, directory, .htaccess |
| Override: | FileInfo |
| Status: | Extension |
@@ -193,11 +193,12 @@ Consult this directive for more information on the syntax.
unset
The response header of this name is removed, if it exists.
If there are multiple headers of the same name, all will be
- removed.
+ removed. value must be omitted.
echo
Request headers with this name are echoed back in the
- response headers. header may be a regular expression.
+ response headers. header may be a regular expression.
+ value must be omitted.
This argument is followed by a header name, which
@@ -213,45 +214,39 @@ Consult this directive for more information on the syntax.
specifiers or a combination of both. The following format specifiers
are supported in value:
-
-
- %t |
+
+%% |
+ The percent sign |
+%t |
The time the request was received in Universal Coordinated Time
since the epoch (Jan. 1, 1970) measured in microseconds. The value
is preceded by t=. |
-
- %D |
+
%D |
The time from when the request was received to the time the
headers are sent on the wire. This is a measure of the duration
of the request. The value is preceded by D=. |
-
- %{FOOBAR}e |
+
%{FOOBAR}e |
The contents of the environment
variable FOOBAR. |
-
- %{FOOBAR}s |
+
%{FOOBAR}s |
The contents of the SSL environment
variable FOOBAR, if mod_ssl is enabled. |
-
-
+
Note
-
The %s format specifier is only available in
Apache 2.1 and later; it can be used instead of %e
to avoid the overhead of enabling SSLOptions
+StdEnvVars. If SSLOptions +StdEnvVars must
be enabled anyway for some other reason, %e will be
more efficient than %s.
-
- When the Header directive is used with the
- add, append, or set
- argument, a fourth argument may be used to specify conditions
+
The Header directive may be followed by an
+ additional argument, which may be used to specify conditions
under which the action will be taken. If the environment variable specified in the
- env=... argument exists (or if the environment
- variable does not exist and env=!... is specified)
+ env=... argument exists (or if the environment
+ variable does not exist and env=!... is specified)
then the action specified by the Header directive
will take effect. Otherwise, the directive will have no effect
on the request.
@@ -267,7 +262,7 @@ Consult this directive for more information on the syntax.
| Description: | Configure HTTP request headers |
| Syntax: | RequestHeader set|append|add|unset header
-[value [env=[!]variable]] |
+[value] [env=[!]variable]
| Context: | server config, virtual host, directory, .htaccess |
| Override: | FileInfo |
| Status: | Extension |
@@ -300,7 +295,8 @@ Consult this directive for more information on the syntax.
unset
The request header of this name is removed, if it exists. If
- there are multiple headers of the same name, all will be removed.
+ there are multiple headers of the same name, all will be removed.
+ value must be omitted.
This argument is followed by a header name, which can
@@ -308,17 +304,20 @@ Consult this directive for more information on the syntax.
ignored. For add, append and
set a value is given as the third argument. If
value contains spaces, it should be surrounded by double
- quotes. For unset, no value should be given.
+ quotes. For unset, no value should be given.
+ value may be a character string, a string containing format
+ specifiers or a combination of both. The supported format specifiers
+ are the same as for the Header,
+ please have a look there for details.
- When the RequestHeader directive is used with the
- add, append, or set argument, a
- fourth argument may be used to specify conditions under which the action
- will be taken. If the environment variable
- specified in the env=... argument exists (or if the environment
- variable does not exist and env=!... is specified) then the
- action specified by the RequestHeader directive will
- take effect. Otherwise, the directive will have no effect on the
- request.
+ The RequestHeader directive may be followed by
+ an additional argument, which may be used to specify conditions under
+ which the action will be taken. If the environment
+ variable specified in the env=... argument
+ exists (or if the environment variable does not exist and
+ env=!... is specified) then the action specified
+ by the RequestHeader directive will take effect.
+ Otherwise, the directive will have no effect on the request.
The RequestHeader directive is processed
just before the request is run by its handler in the fixup phase.
diff --git a/docs/manual/mod/mod_headers.xml.ja b/docs/manual/mod/mod_headers.xml.ja
index ab5aefe005..b555fe524b 100644
--- a/docs/manual/mod/mod_headers.xml.ja
+++ b/docs/manual/mod/mod_headers.xml.ja
@@ -1,7 +1,7 @@
-
+