Welcome! Log In Create A New Profile

Advanced

Re: Dynamic Redirects

Manlio Perillo
April 07, 2010 05:44PM
Harmer, Sean ha scritto:
> NGINX Team,
>
> Is there a way to capture the User-Agent from an HTTP Header, then query
> a database for that User-Agent, then based on the result of the database
> query, transparently route the request to an appropriate server?
>

The User-Agent is in $http_user_agent variable.

If you want to extract a more useful information, you need to use the
perl module, or a custom module (but, as far as I know, there is no
module that allow you to extract useful data from User-Agent header).

For database lookup, you can use the builtin map module:
http://wiki.nginx.org/NginxHttpMapModule


Manlio

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Dynamic Redirects

Harmer, Sean April 07, 2010 03:12PM

Re: Dynamic Redirects

Ezra Zygmuntowicz April 07, 2010 03:36PM

Re: Dynamic Redirects

Harmer, Sean April 07, 2010 04:38PM

Re: Dynamic Redirects

runesoerensen July 26, 2011 10:38PM

Re: Dynamic Redirects

Reinis Rozitis April 07, 2010 05:30PM

Re: Dynamic Redirects

Anonymous User April 07, 2010 06:24PM

Re: Dynamic Redirects

agentzh July 27, 2011 12:18AM

Re: Dynamic Redirects

Manlio Perillo April 07, 2010 05:44PM

Re: Dynamic Redirects

agentzh July 26, 2011 11:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 306
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready