Forum Discussion
Redirect incoming HTTPS request on on prem F5 to AWS ELB
Hello F5 Guru
I have a requirement to redirect incoming https traffic for one of my application to AWS, so when the https request is coming and hitting my VIP on F5 which is on local datacenter that traffic should get redirected to the application which is in AWS.
Please help me to write an iRule for that.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/x/y/" or [string tolower [HTTP::uri]] starts_with "/xx/yy/"} {
here i need a to do something to redirect the traffic to AWS ----- > Please help
} else {
pool pool-xyz-http
}
}
Hi ,
You can try below irule. You need to put specific url in place of aws-url-path where you want to redirect matched requests.
when HTTP_REQUEST { if {([HTTP::uri] starts_with "/x/y/") || ([HTTP::uri] starts_with " /xx/yy/") { HTTP::redirect "https://aws-url-path" } else { pool pool-xyz-http } }
Hope it helps!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com