Andrew_Abplanal
Feb 28, 2007Nimbostratus
strip port information from URL on courtesy redirect
I have found that some versions of IIS add the server’s port information the URL on a courtesy redirect.
Currently I am stripping the port information using this iRule…..
if { [HTTP::header value Location] contains ":29359/" } {
HTTP::header replace Location [string map { ":29359/" "/" } [HTTP::header value Location]]
} elseif { [HTTP::header value Location] contains ":29004/"} {
HTTP::header replace Location [string map { ":29004/" "/" } [HTTP::header value Location]]
} elseif { [HTTP::header value Location] contains ":25621/" } {
HTTP::header replace Location [string map { ":25621/" "/" } [HTTP::header value Location]]
}
I would like to find a way to make this generic and simply strip out any port information.