David_Bohls_209
Mar 03, 2011Nimbostratus
301 Redirect to different port (iRule "Rewrite Redirect"
I currently have an issue where a client of mine is producing (301 302 305 etc...) redirects for certain traffic arriving on http://www.url.com:8081. The current iRule was not set up by me, and I believe is producing the wrong result. Redirects are being translated to https://www.url.com:8081.
I need the redirects to simply go to https://www.url.com.
Do I need to change my iRule below? or Will "Rewrite Redirect" solve the issue?
This iRule is listening for the server's redirect then trying to change the URL.
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
HTTP::respond 301 Location "[string map { http:// https:// } [HTTP::header Location]]"
}
}
Any help would be awesome. Thanks.
Dave