This article provides guidelines for managing custom exception pages. Custom or User-Defined Exceptions can be applied as a general format (applying to all exceptions) or as a single page. To apply a single page, a rule must be created in the Visual Policy Manager (VPM) with the action Return Exception, where the previously created custom exception can be selected.
There are two primary methods to configure a User-Defined exception page:
Understanding Hierarchy
Exception pages follow a hierarchical structure:
Part 1: default values
(exception.user-defined.all
(contact "")
(details "")
(format "")
(help "")
(summary "")
(http
(code "404")
(contact "Contact your network administrator")
(details "")
(format "")
(help "")
(summary "")
)
These lines set default values for all pages under exception.user-defined.all. These override defaults in exception.all but are overridden if specific values are defined within the custom page code.
Note: The (exception.user-defined.all section must remain open while adding custom pages. Custom code should be inserted after the (http...) section. Close the section with an extra ) only after all custom code is entered.
Part 2: custom code
(exception.user-defined.customdenied
(http
(code "403")
(format <<--customdenied--
Our HTML code for the exception page goes here.
--customdenied--
)
)
)
)
Line-by-Line Description:
(exception.user-defined.customdenied: Defines a page named "customdenied." In the VPM, this appears as user-defined.customdenied.
(http: Opens the HTTP response injected by the proxy.
(code "XXX"): Specifies a valid HTTP response code.
Note: Codes like 101 ("switching protocols") or certain 1XX/3XX codes may prevent the exception page from displaying due to browser handling.
(format <<--customdenied--: Opens the HTML content block.
--customdenied--: Closes the HTML block and returns to standard coding format.
): Closes Format, HTTP, and specific exception tags respectively.
Substitution Variables
Variables can be used within the HTML code to provide dynamic information.
Example: Your IP is $(client.address)
The $( ) syntax escapes the HTML and instructs the Proxy to inject the specified content (e.g., client.address or cs-category).
Implementation Example
Search for (exception.user-defined.all on the proxy and replace it with the following structure to add a custom block page:
(exception.user-defined.all
(contact "")
(details "")
(format "")
(help "")
(summary "")
(http
(code "404")
(contact "")
(details "")
(format "")
(help "")
(summary "")
)
(exception.user-defined.customblockexample2
(http
(code "403")
(format <<--customblockexample2--
For a comprehensive list of available variables and further configuration details, consult the following documentation: