Joe_5599_134300
Sep 25, 2014Nimbostratus
URL and URI Pool Selection iRule
I need help with an new irule. I want to check the URL for default http page and send to port 80 pools. All others will be matched on the URI section.
I have the URI section working but when adding in the new URL section the syntax is not correct.
The URL section can be added to the very bottom if needed after URI check.
*Updated irule using. LTM Still does not like the syntax
When HTTP_REQUEST { check for URL and send to pool switch [string tolower [HTTP::host]] { "sam.testsite99.testing2.com" { pool sam.testsite99.testing2.com-80 }
"bob.testsite99.testing2.com" { pool bob.testsite99.testing2.com-80 } } when HTTP_REQUEST { switch -glob [HTTP::uri] { "/sam1" { SSL::disable serverside pool testsite99.testing2.com-8080 } "/bob1" { SSL::disable serverside pool bob.testsite99.testing2.com-8080 }
"/sam2" { SSL::disable serverside pool testsite99.testing2.com-8081 } "/bob2" { SSL::disable serverside pool bob.testsite99.testing2.com-8081 } "/sam3" { SSL::disable serverside pool testsite99.testing2.com-8085 } "/bob3" { SSL::disable serverside pool bob.testsite99.testing2.com-8085 } "/sam4" { SSL::disable serverside pool testsite99.testing2.com-9080 } "/bob4" { SSL::disable serverside pool bob.testsite99.testing2.com-9080 } "/sam5" { SSL::disable serverside pool testsite99.testing2.com-9081 } "/bob5" { SSL::disable serverside pool bob.testsite99.testing2.com-9081 } "/sam6" { SSL::disable serverside pool testsite99.testing2.com-9082 } "/bob6" { SSL::disable serverside pool bob.testsite99.testing2.com-9082 } "/sam7" { SSL::disable serverside pool testsite99.testing2.com-9085 } "/bob7" { SSL::disable serverside pool bob.testsite99.testing2.com-9085 } "/sam8" { SSL::disable serverside pool testsite99.testing2.com-22 } "/bob8" { SSL::disable serverside pool bob.testsite99.testing2.com-22 } "/sam9" { pool testsite99.testing2.com-443 } "/bob9" { pool bob.testsite99.testing2.com-443 } "/sam0" { pool testsite99.testing2.com-8443 } "/bob0" { pool bob.testsite99.testing2.com-8443 } "/bobdemo" { SSL::disable serverside pool bob.testsite99.testing2.com-80 }
}