Forum Discussion
hooleylist
Nov 29, 2010Cirrostratus
Hi dochack,
Can you add logging to the iRule and retest? Also, I assume you're rewriting the URI with the value of the abc header saved to a variable named $abc?
when HTTP_REQUEST {
log local0. "original URI: [HTTP::uri]"
switch -glob [HTTP::uri] {
"/a22/O/cd/wd" {
set xyz [HTTP::header "abc"]
HTTP::uri [string map "/a22/O /a22/$xyz" [HTTP::uri]]
pool p_rewrite
log local0. "Matched case 1"
}
"/a22/O/cd" {
set abc [HTTP::header "abc"]
HTTP::uri [string map "/a22/O /a22/$abc" [HTTP::uri]]
pool p_rewrite
log local0. "Matched case 2"
}
default {
pool p_nonrewrite
log local0. "Default case"
}
}
}
when HTTP_REQUEST priority 501 {
log local0. "Current URI: [HTTP::uri]"
}
Aaron