The failurls File
Last modified: 2022 July 19
Overview
If a user fails to authenticate with cPanel through a custom login form, the /var/cpanel/failurls file allows a reseller to redirect that user to a custom error page.
Requirements
Make certain that your entries in the failurls file meet the following requirements:
- Each entry must be on a separate line.
- Each entry must be a static URL.
- For example:
http://example.com/index.php?failed=1is not a valid entry because it is a dynamic URL. - The login page must pass dynamic content via hidden
POSTvariables.GETquery strings will fail because they will not match any entry in thefailurlsfile. - For example:
<input type="hidden" name="failurl" value=" http://example.com/failed.html " />is a valid hiddenPOSTvariable. - The failurl value in the custom login form must match one of the entries in the
failurlsfile. - For example:
http://example.com/failed.htmlin thefailurlsfile matches the<input type="hidden" name="failurl" value=" http://example.com/failed.html " />hiddenPOSTvariable.
Restart cPanel
After you create the entries in the failurls file, use the following command as the root user to restart cPanel:
/usr/local/cpanel/startup