Maxim Dounin
February 16, 2010 05:08AM
Hello!

On Tue, Feb 16, 2010 at 03:31:10AM -0500, budala10 wrote:

> Let's say ia have 2 different url's to a backend.
>
> On is http://domain.com/a.b.c.d, this i just want to proxy to a
> backend.
>
> But if the reguest is like, http://domain.com/a.b.c.d?id=1222
> then i would like to proxy it somewhere else.

location = /a.b.c.d {
if ($args = "id=1222") {
rewrite ^ /a.b.c.d.id1222 last;
}
proxy_pass ...;
}

location = /a.b.c.d.id1222 {
proxy_pass ...;
}

Maxim Dounin

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

location based on querystring

budala10 February 16, 2010 03:31AM

Re: location based on querystring

Maxim Dounin February 16, 2010 05:08AM

Re: location based on querystring

budala10 February 16, 2010 07:44AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 272
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