Forum Discussion
iRule: Failure to activate payload
Hi John,
Not sure of the error your getting but essentially something like this should work:
when HTTP_REQUEST {
# Log the intercepted request (optional, for debugging)
log local0. "HTTP Request intercepted: [HTTP::method] [HTTP::uri]"
# Respond with custom HTML content
HTTP::respond 200 content {
<!DOCTYPE html>
<html>
<head>
<title>Custom Response</title>
<style>
body { font-family: Arial, sans-serif; background-color: #f0f0f0; text-align: center; padding: 50px; }
h1 { color: #333; }
p { font-size: 18px; color: #666; }
</style>
</head>
<body>
<h1>Welcome to F5 BIG-IP!</h1>
<p>This response was generated directly by an F5 iRule.</p>
<p>Have a great day!</p>
</body>
</html>
}
}
Hi, Jeffery,
That's very much like what I have, and yet, it does not work. I'm not getting an error, and the logging works. It just fails to deliver the page.
Thanks,
John A
Recent Discussions
Related Content
* 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