Discussion Locked

NSX Load Balancer_Application Rule to handle Redirection

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi Guys,

I need some help to write down Application Rule for NSX Load Balancer to handle packet redirection.

There is an iRule (mentioned below) which we are using and need something similar for NSX Application rule.

Kindly assist.

Current iRule on F5:

when HTTP_RESPONSE {

if { [HTTP::is_redirect] } {

if { [string tolower [URI::host [HTTP::header Location]]] contains "" and [URI::protocol [HTTP::header Location]] equals "http"} {

HTTP::header replace Location [string replace [HTTP::header Location] 0 3 https]
}
}
}

Thanks,
JS

4 replies

by jsidd07a

HI Guys,

After some internet crawling i have found the answer to my question.

You can rewrite the Location header from HTTP to HTTPS. The following sample rule identifies the Location header and replaces the HTTP with HTTP.

rspirep ^Location:\ http://(.*) Location:\ https://\1

This discussion is closed to new replies.