Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://old.hcs.cmc.msu.ru/manual/mod/mod_browser.html
Дата изменения: Sat Oct 14 12:56:25 2000 Дата индексирования: Mon Oct 1 23:19:02 2012 Кодировка: |
mod_browser.c
file, and
is compiled in by default. It provides for setting environment
variables based on the browser. This module is part of Apache 1.2.*
only. From Apache 1.3 onwards mod_setenvif
provides the functionality
of this module.
This module allows you to set environment variables based on the name of
the browser accessing your document, based on the User-Agent
header field. This is especially useful when combined with a conditional
HTML language such as XSSI or PHP, and
can provide for simple browser-based negotiation of HTML features.
The BrowserMatch directive defines environment variables based on the
User-Agent
header. The first argument should be a POSIX.2 extended regular
expression (similar to an egrep-style regex). The rest of the arguments
give names of variables to set. These take the form of either
"varname
", "!varname
" or
"varname=value
". In the first form, the value will be set
to "1". The second will remove the given variable if already defined,
and the third will set the variable to the value given by value
. If a User-Agent
string matches more than one entry, they will
be merged. Entries are processed in the order they appear, and later
entries can override earlier ones.
For example:
BrowserMatch ^Mozilla forms jpeg=yes browser=netscape BrowserMatch "^Mozilla/[2-3]" tables agif frames javascript BrowserMatch MSIE !javascript
The BrowserMatchNoCase
directive is semantically identical to
the BrowserMatch
directive. However, it provides for case-insensitive matching. For
example:
BrowserMatchNoCase mac platform=macintosh BrowserMatchNoCase win platform=windows