Jeff_42220
Aug 14, 2009Nimbostratus
404 redirect irule adding requested URL
We use a separate sorry server on our network, and I am trying to figure out how to write an irule that will redirect users to that sorry server when they get a 404 error. I would like the originally requested URL to be passed along as part of that redirect, possibly in an HTTP header so that it can then be read off the sorry server and displayed on the page. How should I do this?
We have the basic 404 irule redirect already in place, but I don't know if I should add the requested Host/URI information into the redirect somehow or if I should accomplish this by some other means. Again, our goal is to have the 404 redirect go to our sorry server, but have something in that redirect that will include the original Host/URI passed over to our sorry server for display on that web page somehow.
when HTTP_RESPONSE {
if { [HTTP::status] contains "404"} {
HTTP::redirect "http://sorryserver"
}
}
Thanks for your assistance!
-Jeff