LyonsG_85618
Jan 13, 2015Cirrostratus
Rewrite HTTP response when error code received
Hi
I need to capture 500 errors and when I receive them return a preformated error page. This page will sit on a different domain (where the digital publishing team can update it quickly) and therefore I need to rewrite HOST/URI and send to different pool.
So far I have the following:
when HTTP_RESPONSE {
switch -glob [HTTP::status] {
"500" {
HTTP::header replace Host "new.domain.com"
HTTP::uri "/error"
pool /TEST/POOL_FOR_NEW_DOMAIN
}
Unfortunately you cannot use HTTP::uri in an HTTP_RESPONSE.
I do not want to do a 302 redirect as that would mean client would see the new domain.
Is there a simple way round this?
I know we can host page on BIG-IP (ifiles) but as mentioned - publishing team want access to the page to change wording quickly.
Thanks in advance for your help.