wihjani_304830
Jan 14, 2019Nimbostratus
iFile maintenance page issue with longer paths
Hi all,
We are using ifiles to serve static maintenance page for our web services. Everything works fine when user navigates to "domain.com/", but if the path contains second "/" (domain.com/abc/) then ifile image won't load.
when HTTP_REQUEST {
if {([active_members Pool-X]) < 1} {
switch [string tolower [HTTP::uri]] {
"/image.png" {
HTTP::respond 200 content [ifile get "image.png"] "Content-Type" "image/png"
}
default {
HTTP::respond 200 content [ifile get "maintenance_page"] "Content-Type" "text/html" connection close
event disable
}
}
}
}
What should I do to make this irule work with any path?
Thanks,
Jani