In this tutorial I’m going to show you how to add a 404 not found error page to your WHMCS template. This guide will focus on our professional WHMCS themes but should work with any WHMCS installation/theme/template.
1) Download and implement files
Firstly click the button above to download the files. Unzip the files to your desktop and then navigate to:
Change your_template to the directory name of your WHMCS template (found under whmcs_path/templates/), e.g eco-net, prosper, fusion
Next upload the contents of desktop/404-error-page/upload/ to the root of your WHMCS installation. The 404.php page should be in your root WHMCS install and 404.tpl inside your activate template directory.
2) Add the redirect to your htaccess file
The final step is setting up the redirect. Open:
If you don't see this file inside cPanel's file manager click on the settings link in the top right and enable the option "show dot files". Then refresh, if you still don't need .htaccess create it as a new file in public_html/
Paste the following to the top of this file:
The above code sets the path of your 404.php error page which will be redirected to is a visitor views a page on your website that doesn't exist.
Note: /404.php has to be changed to the path of your 404.php page, the above is correct if WHMCS is installed in root. If for example it's installed in a directory named /clients/ you would need to use: ErrorDocument 404 /clients/404.php
If you have any issues with this tutorial please leave a comment below and we will be happy to assist you.
Leave a comment
Let us know what you think!