Forum Discussion
Chris_Olson
Aug 23, 2011Nimbostratus
I am having diffculty combining the rules. The logic appears to be what is needed but I don't understand the error.
when HTTP_REQUEST {
if {[HTTP::path] ends_with "/"{ HTTP::path "[HTTP::path]login.cmdx" }
}
switch [getfield [string tolower [HTTP::uri]] "/" 2] {
website { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
website-uat { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
website-sales { HTTP::redirect [HTTP::host] ":" 1][HTTP::uri] }
}
}
01070151:3: Rule error:
line 2: [parse error: PARSE syntax 51 syntax\ error\ in\ expression\ \"\[HTTP::path\]\ ends_with\ \"/\"\{\ HTTP::path\ \"\[HTTP::path\]login.cm...\":\ extra\ tokens\ at\ end\ of\ expression] [{[HTTP::path] ends_with "/"{ HTTP::path "[HTTP::path]login.cmdx" }
}]
line 3: [missing a script after "if"] []