Welcome! Log In Create A New Profile

Advanced

How to compare in the if block.

Posted by micmacs 
How to compare in the if block.
January 28, 2014 08:52AM
Hello.

I need to redirect a request depending on the request_length.

If the request_length is less than or equals 1000 bytes it's redirected to upstream X.
If the request_length is greater than 1000, then it's redirected to upstream Y.

Since the rewrite module doesn't support "less than", "greater than" comparison "If ($request_length > 1000) { ... }" is impossible.
Who can give me a hint how I could extricate myself?

Thanx.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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