Forum Discussion
nitass
Nov 02, 2011Employee
Banyan,
[root@iris:Active] css b virtual bar list
bvirtual bar {
snat automap
pool foo
destination 172.28.17.33:http
ip protocol tcp
rules myrule
profiles {
http {}
tcp {}
}
}
[root@iris:Active] css b rule myrule list
rule myrule {
when HTTP_REQUEST {
set val [HTTP::uri]
log local0. "\[HTTP::uri\] is $val"
log local0. "\[string length $val\] is [string length $val]"
if { ([string length $val] == 0) or ([string length $val] == 1)} {
HTTP::redirect https://[HTTP::host]/apath
}
}
}
[root@iris:Active] css curl -I http://172.28.17.33/
HTTP/1.0 302 Found
Location: https://172.28.17.33/apath
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@iris:Active] css cat /var/log/ltm
Nov 2 20:38:32 local/tmm info tmm[1609]: Rule myrule : [HTTP::uri] is /
Nov 2 20:38:32 local/tmm info tmm[1609]: Rule myrule : [string length /] is 1