eddie_lim_11634
Sep 19, 2017Nimbostratus
Requires assistance with iRule conundrum. /abc/job, /abc/jobs, /abc/jobstatus
Hi, I was asked to setup a redirect iRule for these uri, /abc/jobs, /abc/job, /abc/jobstatus.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/abc/jobs"}{
HTTP::redirect [string map {/abc/jobs /def/ghi/jobs} [HTTP::uri] ]
}
elseif { [HTTP::uri] starts_with "/abc/jobstatus"}{
HTTP::redirect [string map {/abc/jobstatus /def/xyz/executions} [HTTP::uri] ]
}
elseif { [HTTP::uri] starts_with "/abc/job"}{
HTTP::redirect [string map {/abc/job /def/qrs/logging} [HTTP::uri] ]
}
}
The problem is when I access /abc/jobs, I get /def/qrs/loggings. When I access /abc/job, it stalls. /abc/jobstatus seems to be the only working one.
Please let me know what I did wrong. Thanks.