This article explains what to do if all your pages return 404 errors except your main page.
Procedure for WordPress
- Go to File Manager.
- Locate your WP .htaccess file (you may need to enable the option to view hidden files).
- Make a backup copy of this file in case things go wrong.
- Replace the contents of the .htaccess file with the following code:
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
- The 404 error should disappear.
- If this does not work, repeat step 4 as follows: in your WP administration, select Settings -> Permalinks and save. This will regenerate the .htaccess file.
Procedure for Prestashop
- Go to File Manager.
- Rename your Prestashop .htaccess files to .htaccess.old (you may need to enable the option to view hidden files).
- In your Prestashop administration, select Preferences -> SEO and URLs, deactivate Friendly URLs and click on the Save button.
- Reactivate Friendly URLs afterwards and save again.
- This will regenerate the .htaccess file.