Forum Discussion
hooleylist
Apr 24, 2007Cirrostratus
SOL7041 has an example of how to handle scenarios in iRules where you want to prevent the request from going to ASM.
https://tech.f5.com/home/solutions/sol7041.htmlClick here
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
}
}
Aaron