Forum Discussion
Raj_74912
Nimbostratus
Jun 02, 2010Greedy iRule. Need not so greedy one.
Guys and Gals,
I currently have a problem that I am trying to solve. I have a website called www.abc.com and want all requests only going to www.abc.com// to go to a different pool than normal traffic.
Following is what I wrote but the problem is traffic going to www.abc.com//1234/page1.html or www.abc.com//page1.html all goes to redirect pool. I need only
www.abc.com") and ([HTTP::uri] matches_regex "^\/.*?\/")) and ( not ([HTTP::cookie exists $::cknameexist]))} {
set ::proxypool 1
pool proxy.abc.com-80
}
}
when HTTP_RESPONSE {
if {$::proxypool == 1} {
HTTP::cookie insert name "Proxy" value "Enabled" domain "abc.com" path "/"
}
if {($::proxypool == 0)} {
HTTP::cookie remove $::ckname
}
}
Thanks in advance for all your expert help.
Raj
- hoolio
Cirrostratus
Hi Raj, - Raj_74912
Nimbostratus
I can change the variables to local. I am trying to only match URI that starts and end with with / - Raj_74912
Nimbostratus
oh wow. I just noticed the form edited my text folks. - hoolio
Cirrostratus
You could do this with two string functions instead of a regex for better effciency:
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