Forum Discussion
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
- Kevin_Stewart
Employee
Three things:
-
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] -
Make sure you're using the name defined under Local Traffic - iFiles in your [ifile get] - not the name defined under System - File Management.
-
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"
-
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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