This module creates variables, the values of which depend on the request header "User-agent":
- $modern_browser - is equal to the value, assigned by directive modern_browser_value, if browser is identified as an modern browser;
- $ancient_browser - is equal to the value, assigned by directive ancient_browser_value, if browser is identified as an old browser;
- $msie - is equal 1, if browser is identified as MSIE with any version;
If you don't need this module add
--without-http_browser_module parameter to the
./configure call, at compile time.
Selection of the index file:
Redirect for the old browsers:
ERROR in secure-include.php: could not read the given src URL http://wiki.nginx.org/nginx.org/ngx_http_browser_module/ancient_browser.txt
Directive assigns the substrings, during presence of which in the line "User-agent", browser are considered as old.
Special line "netscape4" corresponds to regular expression "^Mozilla/[1-4] ".
ERROR in secure-include.php: could not read the given src URL http://wiki.nginx.org/nginx.org/ngx_http_browser_module/ancient_browser_value.txt
Directive assigns value for the variables $ancient_browser.
ERROR in secure-include.php: could not read the given src URL http://wiki.nginx.org/nginx.org/ngx_http_browser_module/modern_browser.txt
Directive assigns which version of the browser is to be considered as modern.
As browser you can assign the values msie, gecko (Mozilla-based browsers) opera, safari, konqueror.
Of versions it is possible to assign in size X, X.X, X.X.X, or X.X.X.X. maximum values for each of their sizes respectively - 4000, 4000.99, 4000.99.99, and 4000.99.99.99.
Special value "unlisted" indicates to consider modern browser, not described by the modern_browser and ancient_browser directives.
If the headers do not contain "User-agent", the browser is considered ancient (unless "modern_browser unlisted" is specified).
ERROR in secure-include.php: could not read the given src URL http://wiki.nginx.org/nginx.org/ngx_http_browser_module/modern_browser_value.txt
Directive assigns value for the variables $modern_browser.
Note The use of ancient_browser in the link provided below is broken it should use:
ancient_browser "MSIE 4.0" "MSIE 5.0" "MSIE 5.5" "MSIE 6.0";
Example of use: support only recent versions of Chrome, Firefox, Internet Explorer, Safari, Mobile Safari and Palm Pre