We’re attempting to utilize a current software hack load balance for our company website (I’m well aware a set of LTMs can Loadbalance, but for current management issues, we have to leave the site as it is…)
Currently, a user logs in and based on the division of the site they’re logging into, they get directed to a specific server… such as…
base site, www.x.com, log in, redirect to www29.x.com.
We want to strip the www29 from the URL using an irule, but notate the server number in the header/cookie, to keep persistance to that server for the users (session info is cached on a server basis, not site basis).
This is the error message we’re getting currently:
01070151:3: Rule [Server_Hash] error: line 1: [wrong args] [when HTTP_RESPONSE{] line 4: [command is not valid in the current scope] [regexp.com} [HTTP::host] domain server] line 4: [command is not valid in the current scope] [HTTP::host] line 7: [command is not valid in the current scope] [persist hash $server] line 10: [command is not valid in the current scope] [HTTP::redirect Redirecting... | Edmentum] line 10:
[command is not valid in the current scope] [HTTP::uri] line 11: [command is not valid in the current scope] [}]
Our iRule:
when HTTP_RESPONSE{
get HTTP information
regexp {\.[\w]+)\.com} [HTTP::host] domain server
set persistance
persist hash $server
redirect client
HTTP::redirect “http://www.x.com/\[HTTP::uri]”
}
Anyone have a suggestion as to what we’re doing wrong here?
Thanks!