Forum Discussion

ouch_32572's avatar
ouch_32572
Icon for Nimbostratus rankNimbostratus
Mar 19, 2009

irule to rewrite steam in request

Hi All,

 

I have an issue that i have manged to resolve on another Lb (zxtm)

 

I need help translating my rule into an irule for f5.

 

how do i rewite the stream on an incomming request (before it gets sent to the pool)

 

here is my zxtm rule.

 

Read the entire request body

 

$body = http.getBody();

 

$body = string.regexsub( $body, "https://10.104.30.55", "http://10.104.30.55", "gi" );

 

It is pretty basic,

 

in english..

 

i want to get the body of the request and replace https: with http:

 

 

here is what i think the rule should look like, is it correct?

 

 

when HTTP_REQUEST {

 

Disable the stream filter by default

 

STREAM::disable

 

STREAM::expression "@https://10.104.30.55@http://10.104.30.55@"

 

Enable the stream filter for this request only

 

STREAM::enable

 

}

 

32 Replies