1.The best option in my opinion is to identify the overlapping redirects and remove it and make sure that the client & the server see the same URL. I haven't been able to understand the need for masking URL as a Network guy.
2.If you still insist on masking, try something like this:
when HTTP_REQUEST {
if { ([HTTP::host] equals "www.xyz.com") and ([HTTP::uri] eq "/") } {
HTTP::uri "/append"
}
}
when HTTP_RESPONSE {
if { [HTTP::header values Location] contains "/append" } {
HTTP::header replace Location [string map {/append /} [HTTP::header value Location]]
}
}