Forum Discussion
Pierce_Fortin
Nov 28, 2017Nimbostratus
I think I found part of the answer,
when HTTP_REQUEST {
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
if {[HTTP::header value Content-Type] contains "text"}{
STREAM::expression {@foo.com@foo.com/bar@}
STREAM::enable
}
}
But, I only want the script to run when the HTTP_RESPONSE is a response to a specific set of domains. I'm also unsure how I can not do the STREAM expression when the URL is already foo.com/bar, IE: foo.com/stuff should rewrite to foo.com/bar/stuff but foo.com/bar/other should not rewrite to foo.com/bar/bar/other