can you try this?
...
log local0.debug "2. Redirecting to $theUrl"
both redirect and respond give "Illegal argument. Can't execute in the current context. (line 1)", TCP::respond has no effect
HTTP::redirect $theUrl
HTTP::respond 302 Location "$theUrl"
TCP::respond "HTTP/1.1 302 Found\r\nLocation: $theUrl\r\nConnection: close\r\nContent-Length: 0\r\n\r\n"
}\
...
this is mine.
[root@ve1023:Active] config curl -I
http://172.28.19.79
HTTP/1.1 302 Found
Location:
Connection: close
Content-Length: 0
[root@ve1023:Active] config
Nov 30 11:47:19 local/tmm debug tmm[23027]: Rule myrule HTTP_REQUEST: F5 Host: 172.28.19.79, /, 80 ... Server: :
Nov 30 11:47:19 local/tmm debug tmm[23027]: Rule myrule LB_SELECTED: In lb_selected, server is 200.200.200.101:80 ...
Nov 30 11:47:19 local/tmm info tmm[23027]: Rule myrule HTTP_REQUEST: *** Timeout after 3 ms ***
Nov 30 11:47:19 local/tmm debug tmm[23027]: Rule myrule HTTP_REQUEST: 1. Taking node 200.200.200.101:80 out of the mix ...
Nov 30 11:47:19 local/tmm err tmm[23027]: 01010028:3: No members available for pool foo
Nov 30 11:47:19 local/tmm debug tmm[23027]: Rule myrule HTTP_REQUEST: 2. Redirecting to
Nov 30 11:47:19 local/ve1023 err mcpd[21973]: 01070809:3: iRule has marked pool member 200.200.200.101:80 down, no monitor to mark up.
Nov 30 11:47:19 local/ve1023 notice mcpd[21973]: 01070638:5: Pool member 200.200.200.101:80 monitor status iRule down.