Forum Discussion
doc_hack_12696
Nov 29, 2010Nimbostratus
Re-write works with one URI but the other
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/a22/O/cd/wd" {
set xyz [HTTP::header "abc"]
HTTP::uri [string map "/a22/O /a22/$abc" [HTTP::uri]]
pool p_rewrite ...
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
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects