iRule Redirect loop
Hi
I am trying to achieve a simple URL redirect but I keep getting a redirect loop or nothing at all. I get an error of "too many redirects"
Condition 1
All requests to "; must be redirected to https://test.tst.train123.com/trace123 only
But any other traffic eg. "; must continue to the default pool
My problem is when I use the the irule below I get a redirect loop
when HTTP_REQUEST { if { [HTTP::host] equals "test.tst.train123.com" } { HTTP::redirect "https://test.tst.train123.com/Trace123 [HTTP::uri]" } }
When I try this it doesnt seem to work either. I know I am missing something
when HTTP_REQUEST { if { [HTTP::uri] equals "test.tst.train123.com"} { HTTP::redirect "/Trace123" } elseif { [HTTP::uri] equals "; } { pool pool_trace123 } }