Forum Discussion
Bayan_El_Ameen1
Oct 24, 2011Nimbostratus
Hey guys,
This iRule works perfectly for me:
when HTTP_REQUEST {
if { [HTTP::path] equals "/" } {
HTTP::redirect "/apath"
}
}
But before using it I tried the following and it didn't work but I still have the curiosity to know why if anyone has any idea why please let me know. Here's my iRule:
when HTTP_REQUEST {
set val [HTTP::uri]
if { {[string length $val] == 0} or {[string length $val] == 1} } {
HTTP::redirect https://[HTTP::host]/apath
}
}