If it just has 30x redirects, then you only need to apply Redirect Rewrite Matching in your HTTP profile.
The stream iRule is only necessary if the application is sending links (not redirects) back the client with http:// in the URL. If you still need the stream, add the default stream profile to your virtual server and add this iRule (tweak as required):
Example which replaces http:// with https:// in response content
Also prevents server compression in responses
when HTTP_REQUEST {
Disable the stream filter for all requests
STREAM::disable
LTM does not decompress response content, so if the server has compression enabled
and it cannot be disabled on the server, we can prevent the server from sending
a compressed response by removing the compression offerings from the client
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Check if response type is text
if { [HTTP::header value Content-Type] contains "text" } {
Replace http:// with https://
STREAM::expression {@http://@https://@}
Enable the stream filter for this response only
STREAM::enable
}
}