wordpress inner pages 404 code example
Example 1: wordpress main page is showing but other pages show page not found
There can be two solutions for this
1. Modify .Htaccess with the code given below:
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
2. Correct The Permalinks Structure
If you can access you admin panel, Then
Step 1. Inside Settings and then on Permalinks
(Take a look at the current setting. If you’re using a custom permalink
structure, copy-save it somewhere.)
Step 2. Select Default.
Step 3. Click on Save Settings.
If not then inside your database :
options table => Search `permalink_structure` and set it to /%postname%/
reference:
https:
Example 2: every post wp error 404
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>