Forum Discussion
CAMES_13251
Nimbostratus
Jun 20, 2011Remove URI if it doesn't match my options?
Hi All,
I'm quite new to irules, and can't get something working that should be quite simple.
What I am trying to do is redirect the request based on a couple of key words in the U...
Ryan_Paras_7933
Nimbostratus
Jul 26, 2011I just tested this and it worked:
when HTTP_REQUEST {
Check the requested URI set to lowercase
switch -glob "[string tolower [HTTP::uri]]" {
"/uri1" {
HTTP::respond 301 Location "http://www.test.com[HTTP::uri]"
}
default {
HTTP::uri "/"
}
}
}
Is there something else going on in your code that may not be represented in your snippet?
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