Forum Discussion
Stan_Hurton_111
Nimbostratus
Nov 30, 2016Redirect based on incoming port?
I'm trying to accomplish the following with an irule, without much luck.
Can anyone help me achieve the following:
If incoming request to port 8083 or 444 starts with '/sample', then forward re...
Vijay_E
Cirrus
Nov 30, 2016Can you provide you iRule ? It will be easier to edit, if you already have something in place.
This is a rough template for you to tailor to your requirements:
when CLIENT_ACCEPTED {
if { [string tolower [HTTP::uri]] starts_with "/sample" } {
switch [TCP::local_port clientside] {
8083 -
444 { HTTP::respond 301 Location "https://hostname.domain.com:7151" }
8084 -
446 { HTTP::respond 301 Location "http://hostname.domain.com:7152" }
8085 -
447 { HTTP::respond 301 Location "http://hostname.domain.com:7153" }
default { discard }
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects