经过前面的配置,当我们点击文章时,有可能回出现找不到的错误。
默认的固定链接是
http://xxx.com/index.php/2017/03/21/hello-world/ 这样的
我们可以改短点
1.进入后台
http://xxx.com/wordpress/wp-admin/
2.
有的会要你手动改
这是因为你没赋权限给wordpress
解决
[root@zhf html]# cd /var/www/html/
[root@zhf html]# chown -R apache:apache .htaccess
请参考搭建的教程
3.验证
一访问文章发现
哈哈,还没好呢
4.操作
[root@zhf html]# cp /var/www/html/wordpress/.htaccess /var/www/html/
[root@zhf html]# chown -R apache:apache .htaccess
[root@zhf html]# vi /etc/httpd/conf/httpd.conf
修改下面部分(提示vi下/然后输入字符串可以快速到达)
<Directory "/var/www/html">下的
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
None改为All
然后再次到固定链接那点击保存即可
请参考看上一篇博文