Forum Discussion
paulguo_152257
Nimbostratus
Dec 01, 2015Irule exclude url and redirect problem
Origianal Irule as below will filter "/support" string, I want add another one but looks like it's not working.
I appreciate if anyone can help :)
when HTTP_REQUEST {
if { not ([string tolowe...
Kai_Wilke
MVP
Dec 02, 2015Hi Paulguo,
if you want to avoid the empty "then" clause, then try this snipped...
set low_uri [string tolower [HTTP::uri]]
if { not (
( $low_uri starts_with "/support") or
( $low_uri equals "/about-uss/sage-trustwave-pci-compliance" )
)
} then {
HTTP::respond 301 Location "http://www.test.com"
}
BTW: Using the first or second example only depends on your prefered coding style, while providing the same functionality without any noticable performance impacts/gains^^
BTW2: Putting the low_uri into a variable will save some CPU cycles if evaluated more than once^^
HTH, -Kai
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