After installing a script, only the homepage works, but no other pages. Broken links within your website usually produce a 404 error. This error only shows when the link tries to connect a user to a site that doesn’t exist or is incorrect. Each browser shows this error in its own way; some browsers will just show the “404 Not Found” error. Then solve it like this –
cPanel > File Manager > Click on the directory or folder where your website is located > You will see the file named .htaccess > Right-click on it and click on Edit > Then save the following code in any location:
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]
- If your script has index files other than index.php, like index.html, replace .php with .html
- The .htaccess file is hidden. To access it, click Settings on the upper right side, check the Hidden file, and save.
- But if it doesn’t go to the hidden file, there is no .htaccess file. Create a new file called .htaccess