atoth
May 01, 2015Cirrus
Writing and Rewriting a URI
I've got a vip similar to the below.
when HTTP_REQUEST {`
switch -glob [HTTP::path] {
"/a/b/c" -
"/blah/blah/blah" {
HTTP::header replace "Host" "internal.domain.com"
pool redirect-pool
snat automap
} default { pool default-pool }
}
}
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
HTTP::header replace "Host" "external.domain.com"
}
}
What the customer would like to do now is rewrite "/blah/blah/blah" to either "/a/b/c" or "/" and when the traffic returns, rewrite the uri to what it was originally. Is this possible? How would I go about doing something like this?