From d1aa97e053968136005d1a3ca25c31e6ff183db5 Mon Sep 17 00:00:00 2001 From: Nilgun Belma Buguner Date: Sat, 19 Jul 2008 06:42:30 +0000 Subject: [PATCH] pre-translation improvements git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@678108 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/env.xml | 95 +++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 42 deletions(-) diff --git a/docs/manual/env.xml b/docs/manual/env.xml index 5fc3fb03ff..693f40fcba 100644 --- a/docs/manual/env.xml +++ b/docs/manual/env.xml @@ -81,21 +81,21 @@ Conditional Per-Request Settings

For additional flexibility, the directives provided by - mod_setenvif allow environment variables to be set on a - per-request basis, conditional on characteristics of particular + mod_setenvif allow environment variables to be set + on a per-request basis, conditional on characteristics of particular requests. For example, a variable could be set only when a specific browser (User-Agent) is making a request, or only when a specific Referer [sic] header is found. Even more flexibility - is available through the mod_rewrite's RewriteRule which uses the + is available through the mod_rewrite's RewriteRule which uses the [E=...] option to set environment variables.

Unique Identifiers -

Finally, mod_unique_id sets the environment variable - UNIQUE_ID for each request to a value which is +

Finally, mod_unique_id sets the environment + variable UNIQUE_ID for each request to a value which is guaranteed to be unique across "all" requests under very specific conditions.

@@ -130,7 +130,7 @@ not be a number. Characters which do not match this restriction will be replaced by an underscore when passed to CGI scripts and SSI pages. - +
  • The SetEnv directive runs late during request processing meaning that directives such as SetEnvIf and SSI Pages -

    Server-parsed (SSI) documents processed by mod_include's +

    Server-parsed (SSI) documents processed by + mod_include's INCLUDES filter can print environment variables using the echo element, and can use environment variables in flow control elements to makes parts of a page @@ -194,9 +195,9 @@

    Access to the server can be controlled based on the value of environment variables using the allow from env= and deny from env= directives. In combination with - SetEnvIf, this - allows for flexible control of access to the server based on - characteristics of the client. For example, you can use these + SetEnvIf, this + allows for flexible control of access to the server based on + characteristics of the client. For example, you can use these directives to deny access to a particular browser (User-Agent).

    @@ -207,12 +208,12 @@

    Environment variables can be logged in the access log using the LogFormat option %e. In addition, the decision on whether - or not to log requests can be made based on the status of - environment variables using the conditional form of the + or not to log requests can be made based on the status of + environment variables using the conditional form of the CustomLog directive. In combination with SetEnvIf this allows for flexible control of which - requests are logged. For example, you can choose not to log + >SetEnvIf this allows for flexible control of which + requests are logged. For example, you can choose not to log requests for filenames ending in gif, or you can choose to only log requests from clients which are outside your subnet.

    @@ -244,14 +245,15 @@
    URL Rewriting -

    The %{ENV:...} form of TestString in - the RewriteCond - allows mod_rewrite's rewrite +

    The %{ENV:variable} form of + TestString in the RewriteCond allows mod_rewrite's rewrite engine to make decisions conditional on environment variables. - Note that the variables accessible in mod_rewrite without the - ENV: prefix are not actually environment - variables. Rather, they are variables special to mod_rewrite - which cannot be accessed from other modules.

    + Note that the variables accessible in mod_rewrite + without the ENV: prefix are not actually environment + variables. Rather, they are variables special to + mod_rewrite which cannot be accessed from other + modules.

  • @@ -304,9 +306,10 @@
    gzip-only-text/html -

    When set to a value of "1", this variable disables the DEFLATE - output filter provided by mod_deflate for - content-types other than text/html. If you'd rather +

    When set to a value of "1", this variable disables the + DEFLATE output filter provided by + mod_deflate for content-types other than + text/html. If you'd rather use statically compressed files, mod_negotiation evaluates the variable as well (not only for gzip, but for all encodings that differ from "identity").

    @@ -347,7 +350,7 @@ to the client. This is typically used when a client has a known problem handling redirects. This was originally implemented as a result of a problem with Microsoft's WebFolders software which has - a problem handling redirects on directory resources via DAV + a problem handling redirects on directory resources via DAV methods.

    @@ -362,16 +365,18 @@ the client can't (or doesn't) automatically follow the redirection. Apache ordinarily labels this text according to the character set which it uses, which is ISO-8859-1.

    +

    However, if the redirection is to a page that uses a different character set, some broken browser versions will try to use the character set from the redirection text rather than the actual page. This can result in Greek, for instance, being incorrectly rendered.

    +

    Setting this environment variable causes Apache to omit the character set for the redirection text, and these broken browsers will then correctly use that of the destination page.

    - Security note + Security note

    Sending error pages without a specified character set may allow a cross-site-scripting attack for existing browsers (MSIE) @@ -433,11 +438,13 @@ BrowserMatch "JDK/1\.0" force-response-1.0 access log. It can be easily modified to prevent logging of particular directories, or to prevent logging of requests coming from particular hosts.

    -
    -SetEnvIf Request_URI \.gif image-request
    -SetEnvIf Request_URI \.jpg image-request
    -SetEnvIf Request_URI \.png image-request
    -CustomLog logs/access_log common env=!image-request
    + + + SetEnvIf Request_URI \.gif image-request
    + SetEnvIf Request_URI \.jpg image-request
    + SetEnvIf Request_URI \.png image-request
    + CustomLog logs/access_log common env=!image-request +
    @@ -447,16 +454,20 @@ CustomLog logs/access_log common env=!image-request from using images on your server as inline-images on their pages. This is not a recommended configuration, but it can work in limited circumstances. We assume that all your images are in - a directory called /web/images.

    -
    -SetEnvIf Referer "^http://www\.example\.com/" local_referal
    -# Allow browsers that do not send Referer info
    -SetEnvIf Referer "^$" local_referal
    -<Directory /web/images>
    -   Order Deny,Allow
    -   Deny from all
    -   Allow from env=local_referal
    -</Directory>
    + a directory called /web/images.

    + + + SetEnvIf Referer "^http://www\.example\.com/" local_referal + # Allow browsers that do not send Referer info + SetEnvIf Referer "^$" local_referal + <Directory /web/images> + + Order Deny,Allow
    + Deny from all
    + Allow from env=local_referal +
    + </Directory> +

    For more information about this technique, see the "