Forum Discussion
Bayan_El_Ameen1
Nimbostratus
Oct 04, 2011Redirection iRule on ASM Blocking
Hello,
I need an iRule to redirect to home page when the ASM blocks a request.
I know that this can be achieved by selecting a redirect url for the response page instead of using t...
Torti
Cirrus
Nov 03, 2011since i have changed my irule to this:
when ASM_REQUEST_VIOLATION {
get violation informations
set x [ASM::violation_data]
set vio [lindex $x 0]
set uri [HTTP::uri]
set host [HTTP::host]
}
when ASM_REQUEST_BLOCKING {
get violation informationsand set defaults
set x [ASM::violation_data]
set vio [lindex $x 0]
switch through violation events
switch $vio {
"VIOLATION_OBJ_DOESNT_EXIST" -
"VIOLATION_METACHAR_IN_OBJ" {
log local0. "www.host.de --> Blocking $vio (illegal URL), uri=$uri, host=$host"
redirect without Server Header to requested host/index.asp
HTTP::respond 302 noserver Location "http://$host/index.asp"
}
}
}
i got an additional error message:
http_process_state_prepend - Invalid action EV_TCL_CLOSE during ST_HTTP_PREPEND_HEADERS
so i will open a case...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
