Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Stream profile with exception require

jack_10574
Nimbostratus
Nimbostratus

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 } }

 

1 REPLY 1

Kai_Wilke
MVP
MVP

Hi Jack,

you may try the following RegEx patter...

@http://www\.abc\.com@https://www\.abc\.com@@

Cheers, Kai


iRule can do… 😉