Forum Discussion
Dayton_Gray_103
Nimbostratus
Oct 29, 2008Custom 404 passthrough question.
I have the following iRule in place:
when HTTP_REQUEST {
if { [HTTP::uri] contains "pagenotfound.html" } {
event disable all
}
}
when HTTP_RESPONSE {
if { [HTTP::statu...
Dayton_Gray_103
Nimbostratus
Nov 10, 2008Thanks for the reply Aaron,
I am having a hard time understanding how to do this without any redirect. We are not under an LB_FAILED scenario and just want to keep the original URI, but if the web server is returning a 404, send back the contents of the error page without redirection. Here is a non-working code example of what I am trying to accomplish:
when HTTP_REQUEST {
if { [HTTP::uri] contains "404.jsp" } {
event disable all
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == "404" or [HTTP::status] == "500" }{
HTTP::uri "/404.jsp" This doesn't work in HTTP_RESPONSE
LB::reselect pool error_pool This doesn't work in HTTP_RESPONSE
}
}
Any ideas? Thanks!
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