To encode the redirection URL, the handler will use some Apache environment variables and also configuration settings:
These parameters can be configured in Manager, in General Parameters
> Advanced parameters
> Handler redirections
.
Handler use the default Apache error code for the following cases:
These errors can be catch trough Apache ErrorDocument
directive, to redirect user on a specific page:
# Common error page and security parameters ErrorDocument 403 http://auth.example.com/?lmError=403 ErrorDocument 500 http://auth.example.com/?lmError=500 ErrorDocument 503 http://auth.example.com/?lmError=503
It is also possible to redirect the user without using ErrorDocument
: the Handler will not return 403, 500, 503 code, but code 302 (REDIRECT).
The user will be redirected on portal URL with error in the lmError
URL parameter.
These parameters can be configured in Manager, in General Parameters
> Advanced parameters
> Handler redirections
:
The redirection from portal can be done either with code 303 (See Other), or with a JavaScript redirection.
Often the redirection takes some time because it is user's first access to the protected app, so a new app session has to be created : JavaScript redirection improves user experience by informing that authentication is performed, and by preventing from clicking again on the button because it is too slow.