matt_cole_24635
Jan 03, 2017Nimbostratus
iRules vs Polices
I am trying to replicate the following iRule with a LTM Policy. iRule works, policy doesnt work. Does it support regex? How can I match just a / with nothing before or after without regex? iRule:
if {[string tolower [HTTP::uri]] matches_regex {^/$}} { HTTP::redirect "; }}
Policy:
rules {
"Default Page Redirect" {
actions {
0 {
http-reply
redirect
location http://example.com/external/example.jspx
}
1 {
log
write
facility local0
message "tcl: [HTTP::path]"
priority debug
}
}
conditions {
0 {
http-uri
path
values { ^/$ }
}
}
}