Forum Discussion
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/) ...
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
- }
- }
- }
- }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects