Forum Discussion
Kevin_Stewart
Apr 12, 2013Employee
The not operator is definitely supported in 9.x and above - it's a native construct of the TCL language.
I'd try something like this instead:
when HTTP_REQUEST {
if { ( [HTTP::header exists Version] ) and not ( [HTTP::uri] starts_with "/[HTTP::header Version]" ) } {
HTTP::respond 302 Location "http://[HTTP::host]/[HTTP::header Version][HTTP::uri]"
}
}
Your if conditional should start with the exists clause before trying to look for its value.