Forum Discussion
Eric_Frankenfie
Sep 29, 2011Nimbostratus
Parsing URI to Make Pool Selection
I am trying to write an iRule which will read in a URI and then based on what it finds match the source IP address to data lists to make the pool selection. For example... URL: www.example....
Eric_Frankenfie
Oct 26, 2011Nimbostratus
We finally were able to schedule time to test this, however all did not go according to plan.
I modified the iRule as follows
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] contains "/ws/test.asmx" } {
if { ([matchclass [IP::client_addr] equals poolA.AllowList])} {
pool poolA
log local0. "Permitted: [IP::client_addr] --> [HTTP::host][HTTP::uri]"
}
if { ([matchclass [IP::client_addr] equals poolB.AllowList])} {
pool poolB
log local0. "Permitted: [IP::client_addr] --> [HTTP::host][HTTP::uri]"
}
else {
discard
log local0. "Denied: [IP::client_addr] --> [HTTP::host][HTTP::uri]"
}
}
}
It appears that
if { [string tolower [HTTP::path]] contains "/ws/test.asmx" }
is not being evaluated properly. I took all entries out of both 'Data Group List' and I still am able to get to the page. In addition, I checked /var/log/ltm and there are no entries for this iRule.
Are changes to iRules applied immediately or do they need to be reloaded into memory?
Any suggestions?
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