Forum Discussion
Bayan_El_Ameen1
Oct 04, 2011Nimbostratus
Redirection 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 the default response page but I need something more general for I have multiple applications and I want to manage that in an iRule.
I have tried the following iRule but it's not working:
when ASM_REQUEST_BLOCKING {
HTTP::redirect https://[HTTP::host]/
}
Thanks,
Bayan El Ameen
- TortiAltostratuswe are running 10.2.2 HF3
- O.K. could still be a bug. What happens if you use HTTP::respond instead of HTTP::redirect?
- TortiAltostratusexactly the same error log & response
I think it's better to open a support case. Could be a bug.
- TortiAltostratusok,
when HTTP_RESPONSE { HTTP::header remove "Server" better replace it, instead of removing, otherwise some system might not accept your HTTP response HTTP::header replace Server "Sioux Server 3.14159" }
- nitassEmployeei just wonder if HTTP::header remove in HTTP_RESPONSE event can remove Server header in this case since the Server header is generated by HTTP::redirect command in ASM_REQUEST_BLOCKING event.
[root@iris:Active] config b virtual bar list virtual bar { snat automap pool foo destination 172.28.17.33:http ip protocol tcp rules myrule profiles { http {} tcp {} } } [root@iris:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { HTTP::respond 302 noserver Location "http://www.google.com" } } [root@iris:Active] config curl -I http://172.28.17.33 HTTP/1.0 302 Found Location: http://www.google.com Connection: Keep-Alive Content-Length: 0
- TortiAltostratusthe solution of Kurt doesn't work :-( - sry Kurt
- nitassEmployeenow, the only problem is the error message (Invalid action EV_INGRESS_DATA during ST_HTTP_PREPEND_HEADERS)if nothing can be found in askf5, i recommend opening a support case. so, support engineer can help you to find what wrong is.
> i just wonder if HTTP::header remove in HTTP_RESPONSE event can
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