1)Permalink设置
在Settings->Permalinks->Common settings中选择非Default选项时保存以后,返回到Home,点击每篇文章的标题进入阅读的时候出现如下错误(比如点击第一篇自动生成的文章"Hello World!"):
The requested URL /wordpress/hello-world was not found on this server.
Apache/2.2.14 (Ubuntu) Server at localhost Port 80
解决方法如下
sudo vi /etc/apache2/sites-available/default
修改第11行
1 <VirtualHost *:80>
2 ServerAdmin [email protected]
3
4 DocumentRoot /var/www
5 <Directory />
6 Options FollowSymLinks
7 AllowOverride None
8 </Directory>
9 <Directory /var/www/>
10 Options Indexes FollowSymLinks MultiViews
11 AllowOverride All
12 Order allow,deny
13 allow from all
14 </Directory>
重启Apache
sudo service apache2 restart
以上是在本地出现的错误。如果WP在服务器上的话,它会提示你修改.htaccess文件,如果该文件不可写的话要求你手动修改,可写的它会自动帮你完成。
Continue reading →