Forum Discussion
t-roy
Nimbostratus
Jun 07, 2012matching local port AND a variable in one line
I have an iRule built and it is currently looking at the local port, if 443 it appends "-HTTPS" to the pool name variable, but I am concerned that someone might put a POOL-HTTPS name in my data-group, so I would like to only append it if the Pool does not currently end in HTTPS, when I add the && statement I am getting errors, though:
if {[[TCP::local_port] equals 443] && !($pool_select ends_with “HTTPS”)}{
append pool_select "-HTTPS"
- Odds are it's the brackets around the first equals comparison. That is trying to turn the equals comparison into a command that doesn't exist.
if { ([TCP::local_port] equals 443) && !($pool_select ends_with "HTTPS") } { append pool_select "-HTTPS" }
- t-roy
Nimbostratus
yeah... that was it!
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