Forum Discussion

greenasp_41938's avatar
greenasp_41938
Icon for Nimbostratus rankNimbostratus
Jun 17, 2013

Sorry Page with images 10.x

iRule:

 

when HTTP_REQUEST {

 

HTTP::respond 200 content "

 

 

http://www.w3.org/1999/xhtml\" lang=\"en\">

 

 

ETC

 

ETC

 

 

IMAGE HERE

 

 

  •  

     

     

    I have created an maint_index_html_class that has several strings (images -base64):

     

    "android":- klsjflkajjewi etc.

     

"apple":-flkajslkdjflka etc.

 

How to I write the "img src=" statement to call a specific string in the class (ie android in this case)

 

3 Replies

  • not sure if i understand but shouldn't we put image filename (not image file content) in img src tag.

     

     

    LTM Maintenance Page

     

    https://devcentral.f5.com/wiki/irules.ltmmaintenancepage.ashx
  • I have no idea. I have alway used inline base64. However, I have a problem with the iRule length and need to come up with a solution. The problem is, I don't know how to call for an image from within a Data Class Group.

     

  • I have alway used inline base64.i see.

    The problem is, I don't know how to call for an image from within a Data Class Group.can you get image from data group by searching user-agent?

    e.g.

    [root@ve10:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
      log local0. "\[class match -value [string tolower [HTTP::header User-Agent]] continue images_class\]=[class match -value [string tolower [HTTP::header User-Agent]] contains images_class]"
    }
    }
    [root@ve10:Active] config  b class images_class list
    class images_class {
       {
          "android" { "klsjflkajjewi" }
          "apple" { "flkajslkdjflka" }
       }
    }
    
    [root@ve10:Active] config  tail -f /var/log/ltm
    Jun 17 20:08:05 local/tmm info tmm[4950]: Rule myrule : [class match -value .mozilla/5.0 (linux; u; android 4.0.3; ko-kr; lg-l160l build/iml74k) applewebkit/534.30 (khtml, like gecko) version/4.0 mobile safari/534.30 continue images_class]=klsjflkajjewi
    Jun 17 20:09:54 local/tmm info tmm[4950]: Rule myrule : [class match -value mozilla/5.0 (iphone; u; cpu like mac os x; en) applewebkit/420+ (khtml, like gecko) version/3.0 mobile/1c25 safari/419.3 continue images_class]=flkajslkdjflka