Rule using even/odd from uri query parameter

Hello!

I would like to set some rules about query parameter URL, based on odd/even for example:

$ curl -I 'localhost:10001/test/?id=1' #  use one backend
$ curl -I 'localhost:10001/test/?id=2' #  user another backend

I can get the ID using

acl has_id urlp(id) -m bool

But I can’t use even function, I did’t understood the docs :frowning:

Also, I’m able to compare the id with some number, like this:

acl has_id urlp(id) -m int ge 666

But can’t see if is odd or even.

I also tried to use path_reg but this not works with uri, only with path.

Can you please help me?

Thanks!

Worked with:

acl is_odd urlp_val(id) odd -m found

Using urlp_val the value was converted to integer \m/