$ancient_browser - always 1?

Jeffrey 'jf' Lim jfs.world at gmail.com
Wed Mar 23 10:33:09 MSK 2011

as per subject, I'm playing around with the http browser module right now,
and I just can't seem to get it to work.

http://wiki.nginx.org/HttpBrowserModule itself seems confused as well. In
the first part ("Selection of the index file"), it uses the format
'modern_browser msie 5.5' - while in Examples, this format is pointed out as

Either way - I'm expecting for the value of $ancient_browser to only be set
when nginx actually detects an ancient browser as set up by the
'ancient_browser ...' lines. However, it seems that even without specifying
any ancient_browser lines, the $ancient_browser value is set?

to show a snippet of my nginx.conf:
location / {
    if ($ancient_browser) {
        redirect .* /${ancient_browser}.html redirect;

This triggers the redirect no matter what - FF3, MSIE 7, MSIE 8, ...

Am i doing anything wrong here? I'm using nginx 0.8.54, compiled from
nginx.org (and I havent disabled the http browser module)


"Every nonfree program has a lord, a master --
and if you use the program, he is your master."
    --Richard Stallman

"It's so hard to write a graphics driver that open-sourcing it would not
    -- Andrew Fear, Software Product Manager, NVIDIA Corporation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20110323/41915e09/attachment-0001.html>

More information about the nginx mailing list