wp all page going 4040 code example
Example 1: wordpress inner page not found error
NOTE : If you got this error after installing wordpress on a newly configured
ubuntu server
----------------------------------
1. sudo a2enmod rewrite
2. Add AllowOverride All in virtual host
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
3. restart apache
Example 2: every post wp error 404
# 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>
# END WordPress