Forum Discussion
VernonWells
Oct 27, 2017Employee
The Request-URI is a function of an HTTP Request, so it has no meaning in the context of a response. If you use the HTTP::respond, there will be no HTTP_RESPONSE event (since the BIG-IP responds directly).
So, when you match a specific URI Request Path, do you want to respond with a 200 or a 404? I assume 200 with a maintenance page. In that case:
when HTTP_REQUEST {
switch -glob [HTTP::path] {
"/foo/bar/*" -
"/here/there/foo.html" {
HTTP::respond 200 content { maintenanceWe're working. }
}
}
}
This would provide that maintenance page for any URI request path starting with "/foo/bar/" or the absolute path "/here/there/foo.html". You should use an iFile for the actual maintenance page, and a Data Group (class) for the matching URI paths.