when HTTP_REQUEST {
set asm_bypass 0
if { [HTTP::uri] starts_with "/mydir" } {
HTTP::redirect "http://www.mysite.com/myredirect"
set asm_bypass 1
}
}
You could also tweak your rule slightly, as a URI will never be 0 length. If it’s 1 character, it must be “/”.
when HTTP_REQUEST {
by default, don't bypass ASM
set asm_bypass 0
if { [HTTP::uri] eq "/" } {
request was for / so send a redirect and disable ASM for this request
HTTP::redirect "http://www.domain.com/home"
set asm_bypass 1
}
}