Forum Discussion
Miguel
May 22, 2020Nimbostratus
Just add extra path to the ifile location, one will work on the main page and the other on the path, enter like this:
- 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"
- }
- "/abc/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
- }
- }
- }
- }