iRule HTML Maintenance Page insert URI Value
Looking for help writing an iRule that will display, in HTML code, that the page being access has been changed. I'm trying to figure out how to referece the requested URI in HTML since this will vary. Below is what I have for now. Any help is appriciated.
when HTTP_REQUEST {
HTTP::respond 200 content {
<html>
<head>
<title> This Page Has Moved </title>
</head>
<body>
<b> This Page Has Moved </b>
Links and bookmarks to example.com should be updated to example.new.com
The page you requested has moved to https://example.com/<HTTP::uri>
</body>
</html>
}
}
__PRESENT
__PRESENT
__PRESENT
__PRESENT
__PRESENT
Some guidance here. You can use iFiles on F5 to upload your HTML and then serve via an iRule. Easier to maintain!
https://clouddocs.f5.com/api/irules/iFile.html
Finally, you can use HTTP meta tags to try and have the browser auto redirect after a certain time period. Check out the previous post on this:
Using both resources, you should be able to set this up in no time 🙂