Forum Discussion
Matt_Dierick
Nov 12, 2013Employee
This mine, working on my BIGIP. If you want to use ifile, you need to get ifile name. Below, I launch 404 ifile (404.html page) and I request each picture in this html page with ifile.
when HTTP_REQUEST {
used for 404 error page. Send each image png file to 404 HTML page.
switch -glob [string tolower [HTTP::uri]]
{
"*.png"
{
Remove slash and png on /imagexxxx.png and call iFile imagexxxxx
HTTP::respond 200 content [ifile get [getfield [string range [HTTP::uri] 1 end] "." 1]]
}
default {}
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == 404 } {
log local0. "Error 404"
ifile 404 is the HTML page with a reference to photoxxxx.png
HTTP::respond 200 content [ifile get 404]
}