404 Page Not Found Errors
Problem
When navigating to various sections of the Admin Area and Client Area, you see the following error:
404 Not Found: The requested URL was not found on this server.
Cause
In most cases, this error is due to one of the following causes:
- The URL generates an SEO-friendly link instead of a link using variables (for example,
index.php?rp=/admin/setup
). - An outdated
.htaccess
file.
Solution
There are multiple ways to resolve this issue, depending on the cause:
Revert Friendly URL Mode to Basic
WHMCS attempts to automatically detect the correct Friendly URLs mode. However, some server settings may prevent WHMCS from detecting the friendly modes available.
In this case, the easiest way to resolve this issue is changing your Friendly URLs setting to Basic URLs. This ensures that the links are set to the traditional URL that does not require mod_rewrite
or any other server-side rules to render.
To do this:
- Go to Configuration () > System Settings > General Settings and choose the General tab.If the
404
error prevents you from accessing Configuration () > System Settings, type the filename into your browser’s URL bar:configgeneral.php
- In the Friendly URLs section, select Basic URLs.
- Click Save Changes.
When you do this, all of the previously-friendly-styled URLs will revert to a basic format.
If the WHMCS Admin Area is inaccessible, you can also modify the Friendly URL setting by running the following command against your MySQL® database:
UPDATE
tblconfigurationSET
value= 'basic' WHERE
setting = 'RouteUriPathMode';
Update the .htaccess File
To update the .htaccess
file:
- Go to the General tab at Configuration () > System Settings > General Settings.If the
404
error prevents you from accessing Configuration () > System Settings, type the filename into your browser’s URL bar:configgeneral.php
- Scroll to the Friendly URLs section. You may see that this setting is being manually overridden.
- By default, WHMCS will detect and pick the best option for your server environment.
- If it has been manually overridden, there may be a problem in your configuration.
- Click Advanced Settings to the right of the Friendly URLs menu. A new window will display important URI-related information. You may see an indication that Full Friendly Rewrite did not pass the environment mode tests:
- Click the Rewrite File tab. If you see an OUT OF SYNC message under WHMCS Rules, the
.htaccess
rules are out-of-date: - Enable Auto-Managed Rewrite to ensure that the rules stay up-to-date in the future.
- Click Synchronize to close the window.
- Click the Refresh icon for Friendly URLs to refresh the menu. If the issue is resolved, Full Friendly Rewrite will display in the menu and the sections that displayed the
404
error will be accessible again.
Last modified: October 30, 2024