Forum Discussion
Iggy_E
Nimbostratus
May 25, 2021Redirecting to a maintenance page based on http response code and content-type == text/html
We currently redirect to "maintenance pages" based on HTML response error codes I.E http 500 error. We will like to add also checking for response on content type "content-type == text/html" and no...
Amine_Kadimi
MVP
May 25, 2021Try something like this:
if { [HTTP::status] contains "500" and [HTTP::header exists "content-type"] } {
if { [string tolower [HTTP::header value "content-type"]] equals "text/html" }
{ # redirect here
}
}- Iggy_EMay 25, 2021
Nimbostratus
Thanks, I'll try this and let you know.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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