Hi, I can redirect to new port, but how can i elemenated the port, I don’t want to see the port that I am redirecting.
thx for your time.
Hi, I can redirect to new port, but how can i elemenated the port, I don’t want to see the port that I am redirecting.
thx for your time.
Hi,
Here is a Codeshare example which shows how to remove the port from the Location header value in 30x redirects:
http://devcentral.f5.com/wiki/default.aspx/iRules/RewriteHTTPRedirectPort.html
when HTTP_RESPONSE {
Check if server response is a redirect
if { [HTTP::header is_redirect]} {
Log original and updated values
log local0. "Original Location header value: [HTTP::header value Location],\
updated: [string map ":[TCP::remote_port]/ /" [HTTP::header value Location]]"
Do the update
HTTP::header replace Location [string map ":[TCP::remote_port]/ /" [HTTP::header value Location]]
}
}
Aaron