vidya_126776
Mar 05, 2013Nimbostratus
issue with irule script ???
This one works fine.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/secure_one" } {
set replaceURI [string map [list /secure /wrap1] [HTTP::uri]]
HTTP::redirect "$replaceURI"
}
elseif { [HTTP::uri] contains "/one" } {
HTTP::redirect "" }
}
But the following doesn't work fine. why ?
when HTTP_REQUEST {
if {{ [string tolower [HTTP::uri]] contains "/secure_one" } {
set replaceURI [string map [list /secure_one /wrap1] [HTTP::uri]]
HTTP::redirect "$replaceURI"
}
elseif { [HTTP::uri] contains "/one" } {
HTTP::redirect "http://www111.abc.com[HTTP::uri]" }
}
if {{ [string tolower [HTTP::uri]] contains "/ask_wrap" } {
set replaceURI [string map [list /ask_wrap /wrap1] [HTTP::uri]]
HTTP::redirect "$replaceURI"
}
elseif { [HTTP::uri] contains "/wrap" } {
HTTP::redirect "http://www111.abc.com[HTTP::uri]" }
}
if {{ [string tolower [HTTP::uri]] contains "/seek_pond" } {
set replaceURI [string map [list /pond /wrap1] [HTTP::uri]]
HTTP::redirect "$replaceURI"
}
elseif { [HTTP::uri] contains "/seek" } {
HTTP::redirect "http://www111.abc.com[HTTP::uri]" }
}}
no luck with this... have been trying for sometime....