when HTTP_REQUEST {
HTTP::path [string tolower [HTTP::path]]
if {[string tolower [HTTP::uri]] starts_with "/content/preserve/preserve/"} {
continue
STREAM::disable
}
elseif {[string tolower [HTTP::uri]] starts_with "/"} {
set uri [string map -nocase {"/" "/content/site/"} [HTTP::uri]]
HTTP::uri $uri
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
}
when HTTP_RESPONSE {
STREAM::disable
STREAM::expression {@/content/site/@/@}
Enable the stream filter for this response only
STREAM::enable
re-write Location header
HTTP::header replace Location [string map {/content/site/ /} [HTTP::header Location]]
}