404 Error occurs when accessing sub-directories

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>

Add Feedback