How to solve page not found error when using permalinks for wordpress
I got the page not found error when I use the pretty permalinks of wordpress.
Here is how I solved the problem after several round searches using search engines.
- make sure you have the write permission of /var/www/html/ folder
sudo a2enmod rewrite
- edit the file
/etc/apache2/apache2.conf
(here we have an example of/var/www/html
):
1 2 3 4 5 6 |
<Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride None Require all granted </Directory> |
and change it to;
1 2 3 4 5 6 |
<Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory> |
then,
1 2 |
sudo service apache2 restart |
Most people can solve the page not found error after step 3, but I got internal server error.
check the log:
cat /var/log/apache2/error.log,
I found: Invalid command ‘AuthGroupFile’, perhaps misspelled or defined by a module not included in the server configuration.
Then use:
1 2 3 4 5 6 |
sudo a2enmod authz_groupfile we can solve the issue. |