Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to compare in the if block.

$
0
0
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.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>