cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Redirect based on string text from the responce

davelutz
Nimbostratus
Nimbostratus

We have a web application that is out of support and can not be changed at the moment because of cost reduction do to the pandemic. We send customers an email link that points them to the system to make a payment but they are only valid for 12 hours and then they expire. The problem is that once they expire they give a error that the link has expired and then it provides a link to a company we no longer own. What I want to do, if it is possible, is set an iRule that, if it sees "Link Expired" on the responding page, it redirects them to a page we can edit rather then allowing them to click the link to the other company.

 

Any input would be greatly appreciated,

2 REPLIES 2

PeteWhite
F5 Employee
F5 Employee

when HTTP_RESPONSE {

HTTP::collect

}

when HTTP_RESPONSE_DATA {

if { [ string first "text to search for" [HTTP::payload] } {

HTTP::redirect "redirectpage"

}

}

davelutz
Nimbostratus
Nimbostratus

Thank you for the reply, this did what I needed.