Forum Discussion
Hi, my current (test) irule pasted below. The uri is being re-written because the application team want a test environment which can be 'cloned' straight to prod after testing new releases etc, yet wanting the site accessible using the /test url. Does that make sense? The below would work perfectly for me if they had the test and training in /test and /training on the server (without a uri rewrtie).
when HTTP_REQUEST { log local0. "irule Test_5 HIT" if {[string tolower [HTTP::uri]] starts_with "/training" } { HTTP::uri [string map -nocase {"/training" "/"} [HTTP::uri]] pool Training_Pool log local0. "Training Pool selected match on training" } elseif {[string tolower [HTTP::uri]] starts_with "/test" } { HTTP::uri [string map -nocase {"/test" "/"} [HTTP::uri]] pool TEST_POOL log local0. "TEST_POOL selected matched on test" } else { pool Prod_Pool log local0. "Else statement matched and sent to Prod_Pool" } }