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 t...
nitass
Oct 31, 2011Employee
i 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.
anyway, in ltm, i use noserver flag in HTTP::respond command.
HTTP:::respond wiki
http://devcentral.f5.com/wiki/iRules.HTTP__respond.ashx
[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
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