Forum Discussion
Arthur_7109
Nimbostratus
Feb 10, 2014V11.4 replacement for HTTP::class select ?
Hi,
We have a 10.2 LTM + ASM, and need to block some requests based on the URI, with an iRule like
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/xxx" } {
if { !([HTTP::uri] start...
Mike_Maher
Nimbostratus
Feb 10, 2014Have you looked at Local Traffic policy to determine if you can just use that and get rid of this iRule completely? You have the ability in LT policy to pull traffic one way or the other with it and it is a lot more flexible than HTTP Classes were.
Here is an iRule that I had that contains some HTTP Class Events and actions that I moved over to 11.4.1
when CLIENT_ACCEPTED {
set retries 0
}
when HTTP_CLASS_SELECTED {
if {[HTTP::class] eq "/Common/hqdesktop-securera-8000_class"}{
set backup_pool PHX-hqdesktop-8000.edwardjones.com_pool
}
if {[HTTP::class] eq "/Common/desktop-securera-8000_class"}{
set backup_pool PHX-desktop-8000.edwardjones.com_pool
}
}
when LB_FAILED {
if { $retries < [active_members $backup_pool] } {
LB::mode rr
LB::reselect pool $backup_pool
incr retries
}
}
when CLIENT_ACCEPTED {
set retries 0
}
when HTTP_REQUEST {
set policy [POLICY::names matched]
if {[POLICY::rules matched $policy] eq "hqdesktop-securera-8000_class_policy_rule"}{
set backup_pool PHX-hqdesktop-8000.edwardjones.com_pool
}
if {[POLICY::rules matched $policy] eq "desktop-securera-8000_class_policy_rule"} {
set backup_pool PHX-desktop-8000.edwardjones.com_pool
}
}
when LB_FAILED {
if { $retries < [active_members $backup_pool] } {
LB::reselect pool $backup_pool
incr retries
}
}
If you find you need to keep the iRule then hopefully this helps spurs some thoughts on how to re work your iRule
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