Forum Discussion
CAMES_13251
Jun 20, 2011Nimbostratus
Remove 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
Jul 26, 2011Nimbostratus
I 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?
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