Forum Discussion
Mike_86382
Altostratus
Apr 23, 2009A twist on the 404 status code
Hello. I am new to iRules, but I have an important task to accomplish:
I need to rewrite an http response status code from 200 to 404 whenever a particular page is sent to the client. W...
Mike_86382
Altostratus
Apr 24, 2009Thanks for the great direction everyone. To solve the immediate need, I will place our 404 html content in the iRule like so:
when HTTP_REQUEST {
if { [HTTP::uri] contains "404.htm" } {
HTTP::respond 404 content {
Custom 404
All this content comes from our real 404.htm page, but is manually copied into here.
}
}
}
This is just the first step. I want to try to implement the HTTP::collect and do this the right way as I learn more about iRules. Once again, thanks for helping!
-Mike
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