Forum Discussion
uhuru187_324247
Nimbostratus
Jun 14, 2017irules
Could you please advise if this syntax for irules is correct? This is for a page redirect.
when HTTP_RESPONSE {
if { [HTTP::status] contains "404" or [HTTP::status] contains "410" or [HTTP::sta...
cjunior
Nacreous
Jun 14, 2017Hello uhuru187,
I'd prefer to do this:
when HTTP_RESPONSE {
if { [HTTP::status] == 404 || [HTTP::status] == 410 || [HTTP::status] == 500 || [HTTP::status] == 503 } {
HTTP::redirect "https://thiswebsite.com";
}
}
Since "[HTTP::status]" returns a HTTP code and check with "equals" operator.
Regards.
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
