Forum Discussion
Brent_Sachnoff_
Nimbostratus
Oct 23, 2007Using switch with uri
I'm having some issues using the switch command and uri's. I believe the switch command is only for EQUALS to something for it to work properly which means this wouldn't work at all. Here is a sample:
when HTTP_REQUEST {
switch [HTTP::uri] {
"/search/" { pool search }
"/int_search/" { pool search }
"/pictures/" { node 10.4.43.1 80 }
"/" { HTTP::redirect "https://[HTTP::host]/IMT/LoginAction.go" }
default {
pool www
}
}
}
is there a way to "match" vs equal on the uri in a switch statement?
starts_with "/search" or starts_with "/int_search/"
Thanks!
Brent
11 Replies
- Brent_Sachnoff_
Nimbostratus
I was confusing two pieces of code there. I should have been using:
HTTP::cookie insert name cc value "123456789" path "/cc"
Using the above command, should that automagically add that to the header?
How could I use this particular cookie for my persistence?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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