发布于 2014-12-21 03:32:16 | 179 次阅读 | 评论: 1 | 来源: PHPERZ

这里有新鲜出炉的精品教程,程序狗速度看过来!

WordPress开源博客平台

WordPress是一种使用PHP语言开发的博客平台,用户可以在支持PHP和MySQL数据库的服务器上架设属于自己的网站。也可以把 WordPress当作一个内容管理系统(CMS)来使用。


本文为大家讲解的是wordpress 设置默认的固定连接后不能访问(伪静态问题),感兴趣的同学参考下。

问题描述

wordpress 固定连接设置成: 数字型     http://www.test.net/archives/123

环境:

wordpress 版本: 4.1
apache 版本
root@test:/etc/apache2# apache2 -v
Server version: Apache/2.4.7 (Ubuntu)
Server built:   Jul 22 2014 14:36:39
 

解决方法

1  开启mod-rewrite

root@test:/etc/apache2# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  service apache2 restart
root@test:/etc/apache2# service apache2 restart
 * Restarting web server apache2

2   查看mod-rewrite 

root@test:/etc/apache2# ls -al /etc/apache2/mods-enabled/rewrite.load
lrwxrwxrwx 1 root root 30 Dec 20 13:00 /etc/apache2/mods-enabled/rewrite.load -> ../mods-available/rewrite.load

3   修改目录

root@test:/etc/apache2# vim apache2.conf
<Directory /var/www/>
        Options FollowSymLinks
        AllowOverride ALL
        Require all granted
</Directory>


最新网友评论  共有(1)条评论 发布评论 返回顶部
asukzs 发布于2015-10-03 17:11:09
果断收藏
支持(0)  反对(0)  回复

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务