in NetScaler, System, Traffic Management

Oops!

The issue we are trying to resolve is that if a backend webserver returns an internal server error (500) or otherwise, you might want to provide the end user with information he (or she) can send to the helpdesk. Especially Internet Explorer has convenient pages setup locally, that will not reveal anything on what might have gone wrong.

Returning an Oops! page when the backend webserver misfires.

An Oops page might look like this:

Oops!

(500 Internal Server Error)
Your IP address: 10.31.0.132
Requested url: www.mydomain.com/test123/
Please contact the helpdesk

How it is done:

  1. Create a policy expression called PE_SorryPage:

    Notice: We actually give back 418 as error code (eat this IE)  ;=)
  2. Create a stringmap called SM_SorryHelper

    Notice: The key values (like 500) are important in this stringmap, the values (like Server Error) are there as a reminder/remark.. (yes this could have been a patternset)
  3. Create a rewrite action:
  4. Create a rewrite policy:

  5. Bind the rewrite policy to the HTTP/HTTPS vserver.

Have fun!

What do you think?

Comment

  1. Hi,

    I applied same configuration to my NS. Even though rewrite policy is bound to both LBVS and CSVS, it cannot get any hits. I even tried to bind it globally but it doesn’t seem to work. I disable my HTTP services to get 503 response from NS.

    What do you think of rewrite policies not getting hit even when I evaluate policy expression successfully? Where should I bind this rewrite policy and how should I test 503 response on NS.

    Thanks,
    Kind Regards.

    Erdem Ulutas