Forum Discussion
Brett__01_13258
Mar 14, 2014Nimbostratus
irule redirect on uri including default location
Im having trouble with requests that i need to redirect based on uri.
My irule is
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/test/" - "/test1/"
{ HTTP::redirect "http:/...
Cory_50405
Noctilucent
Brett,
Something like this should work by catching /test, or anything after it:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/test*" -
"/test1/*" { HTTP::redirect "http://redirected.server.com[HTTP::uri]" }
default { pool POOL_MainPool_Server-80 }
}
}
Brett__01_13258
Mar 17, 2014Nimbostratus
Hi Cory thanks for the reply
THe issue with the rule above is it will also catching /testing for example
What i need it to do is only redirect /test and /test/whatever but not anything after /test such as /testing
I may have to include double rules?
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