Forum Discussion

larry_b__01_137's avatar
larry_b__01_137
Icon for Nimbostratus rankNimbostratus
Jul 11, 2014

maintenance page withirule and ifiles

Hi, trying to drum up a sorry page for PeopleSoft 9.2 App with little success reading in the image file: The psfs-index.html file reads but no image. Here is the irule:

 

when HTTP_REQUEST{ if {[active_members [LB::server pool]] < 1} { switch [HTTP::uri] { "/psp/ps/?cmd=login" { HTTP::respond 200 content [ifile get "psfs-index.html"] } "/FSPRD92_ProgramSiteDown_v3_sprites.png" { HTTP::respond 200 content [ifile get "FSPRD92_ProgramSiteDown_v3_sprites.png"] } } } }

 

When switch [HTTP::uri] { "/psp/ps/?cmd=login" ... is set to only "/" it seems to work. However, it's the login page that clients land on that I need to serve up the maintenance page on.

 

1 Reply

  • Three things:

    1. Add a log statement at the beginning of the HTTP_REQUEST event to show the incoming URI. You may need to simply do a [string tolower [HTTP::uri]] evaluation.

      log local0. [HTTP::uri]
      
    2. Make sure you're using the name defined under Local Traffic - iFiles in your [ifile get] - not the name defined under System - File Management.

    3. Once you get the switch working, you should add a Content-Type header to the image response:

      HTTP::respond 200 content [ifile get catpic] "Content-Type" "image/png"