Forum Discussion
Rob_Eberhardt_7
Sep 27, 2007Historic F5 Account
Basic 404 prevention iRule not working in IE (Firefox fine)
I have a basic 404 prevention iRule that sends one message if we receive a 404 from the backend, and another message if the pool members are not available. The rule works 100% in Firefox, but does not work in IE for either 404 or LB_Failed.
when RULE_INIT {
set error_404 {
Sorry, but the page you requested could not be found.
Please check that the requested page was typed properly and
try again.
}
set Servers_down {
Sorry, Servers are currently down for maintenance.
Please check back in 10 minutes.
}
}
when LB_FAILED {
HTTP::respond 200 content [subst $::Servers_down]
}
when HTTP_RESPONSE {
if { [HTTP::status] == 404 } {
HTTP::respond 200 content [subst $::error_404]
}
}
- Colin_Walker_12Historic F5 AccountCool rule. Is there a specific question you wanted to ask, or are you just looking for ideas on why this isn't working in IE?
- Andy_Herrman_22
Nimbostratus
What do you get in IE? Is it just blank, or do you get a 404 error? - Rob_Eberhardt_7Historic F5 AccountWow. Sorry for the lack of detail there. I was onsite this AM digging into the issue, and didn't realize how little information I included. Now that there's a few gallons of coffee in me, here's the situation:
- Andy_Herrman_22
Nimbostratus
So, I kind of doubt the iRule itself is having problems with IE vs FF, as it probably knows nothing about which one it is. My guess is IE might just be handling the response slightly differently. - Andy_Herrman_22
Nimbostratus
Random question: How come you're defining the contents using {} with subst instead of just ""? I doubt it would make any difference, but I'm kind of curious why you chose that. - Rob_Eberhardt_7Historic F5 AccountNo reason for the subst versus "" - this is actually a combination of a few random irules and I didn't change it. I should be back in front of the customer tomorrow, I'm interested to be able to play with the issue again. I will keep the forum posted, thanks!
- Rob_Eberhardt_7Historic F5 AccountGot it all working, and have answers for all of the behavior. So with the iRule, 404 prevention worked fine in all browsers except IE 6 at the customer site. Turns out they had some custom IE build that was somehow causing resets instead of 404s (no clue how). I had them reset IE 6 settings to default, and 404's started working. However, server down prevention messages didn't work in any browser, anywhere due to the LB::Failed usage in my iRule. I tested this using both a purposefully broken monitor, as well as simply disabling the server. I ended up switching LB::Failed to:
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