apache2.4 wordpress permalink the requested URL was not found

The requested URL /about was not found on this server

Solution

1)

In case you are on Ubuntu, edit the file /etc/apache2/apache2.conf (here we have an example of /var/www):

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
</Directory>
改成:
<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>


2)再运行  sudo a2enmod rewrite , 重新运行apache2 

知识参考:WordPress's index.php and .htaccess files should be together in the directory indicated by the Site address (URL) setting on your General Options page. 

Solved Permalink Issue Wordpress ** 1) Login to wordpress

dashboard > click on settings > premalinks > then select post name. 2) After that login to

your hosting server goto .htaccess file and replace the code.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Ubuntu 16.04 LTS.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325525130&siteId=291194637