Nathan_at_Hamli
Oct 06, 2014Nimbostratus
Writing First iRule, redirects and rewrites based on URI
Looking for some assistance as a total iRule novice:
The expected behavior is that if an HTTP request against the virtual server is for the root it will redirect to /pwclient/ on the default pool, if the request starts with /copy* it will rewrite the uri as /helixws*
when HTTP_REQUEST {
if { ([HTTP::uri] == "/") } {
HTTP::redirect "/pwclient/"
} elseif { ([HTTP::uri] starts_with "/copy") } {
pool piperxpress_copy_tcp_443_pool
set uri [string map -nocase {"/copy" "/helixws"} [HTTP::uri]]
HTTP::uri $uri
}
}
The first half of this conditional works, however the second (rewrite URI and pull from non-default pool) does not... based on the access logs in the second pool it doesn't even appear to be hitting the pool.
If anyone could point me in the right direction, I would appreciate it.