# different Irule behaviour for HTTP\_REQUEST vs LB\_FAILED

**URL:** <https://community.f5.com/t/different-irule-behaviour-for-http-request-vs-lb-failed/14422>\
**Category:** Technical Forums\
**Created:** [March 6, 2015, 10:16am UTC](https://community.f5.com/t/different-irule-behaviour-for-http-request-vs-lb-failed/14422 "2015-03-06T10:16:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dan\_123791](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Dan\_123791](https://community.f5.com/u/Dan_123791)\
**Post date:** [March 6, 2015, 10:16am UTC](https://community.f5.com/t/different-irule-behaviour-for-http-request-vs-lb-failed/14422/1 "2015-03-06T10:16:24Z")

</div>

Hi,

I have an irule which has a full webpage embedded within it (including an exceptionally long style tag).

when I trigger this iRule using

when HTTP\_REQUEST {

then the full webpage is displayed… however if I only modify the first line to

when LB\_FAILED {

The header information is picked up, style tag gets truncated and the rest of the webpage (the body)is not displayed.

Please advise what is causing this… am planning to test if same behaviour occurs if I use an iFile for the embedded webpage

Thanks

---

<div class="post-metadata">

**Author:** ![Dan\_123791](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Dan\_123791](https://community.f5.com/u/Dan_123791)\
**Post date:** [March 6, 2015, 10:18am UTC](https://community.f5.com/t/different-irule-behaviour-for-http-request-vs-lb-failed/14422/2 "2015-03-06T10:18:03Z")

</div>

am on BigIP 11.3.0 Build 3093.0 Hotfix HF4

---

<div class="post-metadata">

**Author:** ![Dan\_123791](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Dan\_123791](https://community.f5.com/u/Dan_123791)\
**Post date:** [March 6, 2015, 10:59am UTC](https://community.f5.com/t/different-irule-behaviour-for-http-request-vs-lb-failed/14422/3 "2015-03-06T10:59:57Z")

</div>

Just tried using an iFile and same behaviour observed…? Any ideas on this? sounds like a bug

---

<div class="post-metadata">

**Author:** ![Michael\_Jenkins](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@Michael\_Jenkins](https://community.f5.com/u/Michael_Jenkins)\
**Post date:** [March 6, 2015, 11:08am UTC](https://community.f5.com/t/different-irule-behaviour-for-http-request-vs-lb-failed/14422/4 "2015-03-06T11:08:28Z")

</div>

Check out [SOL9456](https://support.f5.com/kb/en-us/solutions/public/9000/400/sol9456.html). I think it may help answer your question. The _Applies To_ only goes up to 11.4, so it me not be an issue on versions past that (in case you plan to upgrade).

---

<div class="post-metadata">

**Author:** ![Dan\_123791](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@Dan\_123791](https://community.f5.com/u/Dan_123791)\
**Post date:** [April 9, 2015, 10:59am UTC](https://community.f5.com/t/different-irule-behaviour-for-http-request-vs-lb-failed/14422/5 "2015-04-09T10:59:15Z")

</div>

Thanks Michael J, definitely this is some sort of bug but it does not work with the workarounds suggested

Finally landed up using advice from this link: [https://devcentral.f5.com/questions/how-to-create-irule-to-deliver-an-alternate-page-response-other-than-page-unavailable](https://devcentral.f5.com/questions/how-to-create-irule-to-deliver-an-alternate-page-response-other-than-page-unavailable)

i.e. when HTTP\_REQUEST { if {[active\_members [LB::server pool]] \< 1} { switch [HTTP::uri] { “/guardian\_header.jpg” { HTTP::respond 200 content [ifile get “guardian\_header\_jpg”] } “/guardian\_logo.jpg” { HTTP::respond 200 content [ifile get “guardian\_logo\_jpg”] } default { HTTP::respond 200 content [ifile get “maint\_index\_html”] } } } }
