2.3.36 BrowserMatch
BrowserMatch sets up environment variables for each web browser.
Description
BrowserMatch sets up environment variables for each web browser. The default value for each environment variable is 1. If you specify ! before environment_variable, the setup of the environment variable is canceled. You can use regular expressions to specify browser_name, which is case sensitive.
Syntax
BrowserMatch "browser_name" environment_variable[=value] [environment_variable[=value] ...]
Locations where it can be written
httpsd.conf, <VirtualHost>, <Directory>, and .htaccess
Example
BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully BrowserMatch "^gnome-vfs" redirect-carefully
The following table provides descriptions of the variables (environment_variable) used in the example.
Environment variable |
Description |
---|---|
nokeepalive |
Disables the KeepAlive connection. If the Via header is added to the request, the KeepAlive connection cannot be disabled. |
downgrade-1.0 |
Treats a request of HTTP/1.1 or later as a request of HTTP/1.0. |
force-response-1.0 |
Always sends a response of HTTP/1.0, in response to a request of HTTP/1.0. |
redirect-carefully |
If the URL used for accessing a directory does not end with a forward slash (/) and uses a method other than the GET method, redirection is not requested to the client. |