diff options
Diffstat (limited to 'docs/manual/env.html.en')
-rw-r--r-- | docs/manual/env.html.en | 92 |
1 files changed, 47 insertions, 45 deletions
diff --git a/docs/manual/env.html.en b/docs/manual/env.html.en index e40c717df6..eb1bc42386 100644 --- a/docs/manual/env.html.en +++ b/docs/manual/env.html.en @@ -408,14 +408,15 @@ </a></code> and <code class="module"><a href="./mod/mod_header.html">mod_header</a></code> allows you to still accept these headers:</p> -<div class="example"><p><code> -# <br /> -# The following works around a client sending a broken Accept_Encoding<br /> -# header.<br /> -#<br /> -SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1<br /> +<pre class="prettyprint lang-config"> +# +# The following works around a client sending a broken Accept_Encoding +# header. +# +SetEnvIfNoCase ^Accept.Encoding$ ^(.*)$ fix_accept_encoding=$1 RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encoding -</code></p></div> +</pre> + @@ -426,27 +427,28 @@ RequestHeader set Accept-Encoding %{fix_accept_encoding}e env=fix_accept_encodin httpd.conf to deal with known client problems. Since the affected clients are no longer seen in the wild, this configuration is likely no-longer necessary.</p> -<div class="example"><p><code> -#<br /> -# The following directives modify normal HTTP response behavior.<br /> -# The first directive disables keepalive for Netscape 2.x and browsers that<br /> -# spoof it. There are known problems with these browser implementations.<br /> -# The second directive is for Microsoft Internet Explorer 4.0b2<br /> -# which has a broken HTTP/1.1 implementation and does not properly<br /> -# support keepalive when it is used on 301 or 302 (redirect) responses.<br /> -#<br /> -BrowserMatch "Mozilla/2" nokeepalive<br /> -BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0<br /> -<br /> -#<br /> -# The following directive disables HTTP/1.1 responses to browsers which<br /> -# are in violation of the HTTP/1.0 spec by not being able to understand a<br /> -# basic 1.1 response.<br /> -#<br /> -BrowserMatch "RealPlayer 4\.0" force-response-1.0<br /> -BrowserMatch "Java/1\.0" force-response-1.0<br /> +<pre class="prettyprint lang-config"> +# +# The following directives modify normal HTTP response behavior. +# The first directive disables keepalive for Netscape 2.x and browsers that +# spoof it. There are known problems with these browser implementations. +# The second directive is for Microsoft Internet Explorer 4.0b2 +# which has a broken HTTP/1.1 implementation and does not properly +# support keepalive when it is used on 301 or 302 (redirect) responses. +# +BrowserMatch "Mozilla/2" nokeepalive +BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 + +# +# The following directive disables HTTP/1.1 responses to browsers which +# are in violation of the HTTP/1.0 spec by not being able to understand a +# basic 1.1 response. +# +BrowserMatch "RealPlayer 4\.0" force-response-1.0 +BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 -</code></p></div> +</pre> + <h3><a name="no-img-log" id="no-img-log">Do not log requests for images in the access log</a></h3> @@ -457,12 +459,13 @@ BrowserMatch "JDK/1\.0" force-response-1.0 particular directories, or to prevent logging of requests coming from particular hosts.</p> - <div class="example"><p><code> - SetEnvIf Request_URI \.gif image-request<br /> - SetEnvIf Request_URI \.jpg image-request<br /> - SetEnvIf Request_URI \.png image-request<br /> - CustomLog logs/access_log common env=!image-request - </code></p></div> + <pre class="prettyprint lang-config"> +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 + </pre> + <h3><a name="image-theft" id="image-theft">Prevent "Image Theft"</a></h3> @@ -474,18 +477,17 @@ BrowserMatch "JDK/1\.0" force-response-1.0 in limited circumstances. We assume that all your images are in a directory called <code>/web/images</code>.</p> - <div class="example"><p><code> - SetEnvIf Referer "^http://www\.example\.com/" local_referal<br /> - # Allow browsers that do not send Referer info<br /> - SetEnvIf Referer "^$" local_referal<br /> - <Directory /web/images><br /> - <span class="indent"> - Order Deny,Allow<br /> - Deny from all<br /> - Allow from env=local_referal - </span> - </Directory> - </code></p></div> + <pre class="prettyprint lang-config"> +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> + </pre> + <p>For more information about this technique, see the "<a href="http://www.serverwatch.com/tutorials/article.php/1132731">Keeping Your Images from Adorning Other Sites</a>" |