Hello All,

I’ve decided to start this blog to spread the knowledge of NetScaler (or at least the little bit that I know) in hopes that maybe what I post can clarify some things for someone who might have some questions pertaining to the world of Citrix.

First off is my very first KB article, which can be seen here http://support.citrix.com/article/CTX128732 and I’ll break it down in this post.

The customer I was working with was attempting to load balance based on a token found in the incoming request. He had already set it up just fine with one variable which was HTTP.REQ.URL.QUERY.VALUE(“ex_cookie”)

The customer then wanted to add an additional string of HTTP.REQ.HEADER(“ex_cookie”) to create a string that essentially said:

Look for HTTP.REQ.URL.QUERY.VALUE(“ex_cookie”), if that does not exist, look for HTTP.REQ.HEADER(“ex_cookie”)

However, when specifying the || or && operators in the Rule field under Methods and Persistence of the Load Balancing virtual server, the following error message would appear

To get around this we had to use the ALT operator when building the expression

HTTP.REQ.URL.QUERY.VALUE(“ex_cookie”) *ALT  *HTTP.REQ.HEADER(“ex_cookie”)

Which essentially states:

Use the token value as HTTP.REQ.URL.QUERY.VALUE(“ex_cookie”) if it evaluates to a non-null string, else the value is  HTTP.REQ.HEADER(“ex_cookie”)

To create this expression open your LB VServer, open the Method And Persistence tab. Switch the LB Method to “Token” and input your rule. It should look something like this if you click the configure button