Chapter 3. URL Mapping

URL mapping, or translation, is the first major stage in request handling. Later stages, such as access controls and content type determination, work with the translated URL.

Initial Environment Setup

The mod_setenvif module is run before URL translation for main and virtual server contexts and after URL translation for directory sections and .htaccess files. At this point, only the values of the request line and of the HTTP request headers are available. mod_setenvif sets environment variables based on these values; the variables are in turn often used to control URL rewriting, authentication, conditional logging, and other conditional behaviors.

There are a number of special environment variables that, if set, modify the response of the server, particularly to cope with buggy clients. mod_proxy defines further special variables related to proxying; these are covered in Chapter 9.

downgrade-1.0

Forces the request to be treated as an HTTP/1.0 request

force-gzip

Forces output compression if the DEFLATE filter is activated

force-no-vary

Forces any Vary headers to be removed from the response (implies force-response-1.0)

force-response-1.0

Forces Apache to respond with an HTTP/1.0 response

gzip-only-text/html

Disables compression for content types other than text/html if the value is set to 1

no-gzip

Disables compressed output

nokeepalive

Disables keepalive

prefer-language

Indicates a preferred language that overrides the content negotiation process and takes precedence over the ...

Get Apache 2 Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.