Forum Discussion

jack_10574's avatar
jack_10574
Icon for Nimbostratus rankNimbostratus
Jul 13, 2016

Stream profile with exception require

Hi All i am having a requierment with need to put stream profile in a https virtual server. The virtual server are insert the default stream profile and irule . The irule objective are when http responsed, it need replace http://www.abc.com to https://www.abc.com , however, if having http://1.1.1.1 then it need remain to http without any changes.

 

I did refer and used irule as below but it look like didnt work as i didnt see http://www.abc.com become https://www.abc.com . Can anyone advice why the irule didnt perform replacement with stream and didnt working . any better idea to make it work ?

 

when HTTP_REQUEST { STREAM::disable HTTP::header remove "Accept-Encoding" }

 

when HTTP_RESPONSE { if {[HTTP::header value Content-Type] contains "text"}{ STREAM::expression {@http://www.abc.com@https://www.abc.com@} STREAM::enable } }