404 Error occurs when accessing sub-directories, but homepage works well.
Reason: .htaccess file is missing.
- Solution 1: Automatically create the file via wp-admin portal.
Settings - Permalink, Save Changes.
- Solution 2: Manually create .htaccess file with permission 744. Contents are as below:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Article ID: 522, Created: April 20, 2020 at 1:35 AM, Modified: February 17, 2021 at 8:55 PM