Note
When a user access a Handler without a cookie, he is redirected on portal, and the target URL is encoded in redirection URL (to redirect user after authentication process).
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.
Tip
These settings can be overridden per virtual host, see virtual host management.
Handler use the default Apache error code for the following cases:
These errors can be catch through Apache ErrorDocument directive or Nginx error_page directive, to redirect user on a specific page:
# Apache: 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
With Nginx, you must add these directives in the location / { section:
# Nginx: Common error page and security parameters
error_page 403 http://auth.example.com/lmerror/403;
error_page 500 http://auth.example.com/lmerror/500;
error_page 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 route.
These parameters can be configured in Manager, in General Parameters > Advanced parameters > Handler redirections:
Note
If a user is redirected from handler to portal for authentication and once he is authenticated, portal redirects him to the redirection URL.