Forum Discussion
Kai_Wilke
Dec 02, 2015MVP
Hi 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