Forum Discussion
jurgenvdmark_14
May 17, 2018Nimbostratus
I'm using the following rule for this purpose. It basically strips the host part of http redirects and returns the relative path:
ltm rule redirect_absolute_to_relative {
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
Replace absolute redirect with relative redirect
HTTP::header replace Location [regsub {https?://[^/]*/} [HTTP::header value location] "/"]
}
}
}
Hope this answers your question