开发者社区> 问答> 正文

wordpress伪静态研究一天了不幸啊404

阿里云主机 CentOS 5.4 32位系统 阿里云官方环境
首先写wordpress伪静态规则
location / {
index index.html index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
网上找了很多都是这么写的


然后修改phpwind.conf文件调用伪静态文件

#伪静态规则
#    include /alidata/server/nginx/conf/rewrite/wordpress.conf;    修改这里路径调用伪静态规则文件
    log_format  phpwind  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';
    access_log  /alidata/log/nginx/access/phpwind.log phpwind;


wordpress后台设置固定链接 /%post_id%.html
最后打开网站404 郁闷啊 搞了一天了 求救高手大牛啊。




展开
收起
lijiong 2013-01-14 00:35:27 10053 0
5 条回答
写回答
取消 提交回答
  • 非常不建议用nginx跑php,用lnamp搞wordpress吧。
    apache的伪静态规则,直接丢到网站根目录。
    另外,推荐你装个wdcp面板,简单,维修高效。
    2014-03-06 09:55:14
    赞同 展开评论 打赏
  • 回1楼macworks的帖子
    兄弟,我也是同样地问题,请教解决办法啊
    2014-03-05 10:32:11
    赞同 展开评论 打赏
  • Rewordpress伪静态研究一天了不幸啊404
    为什么会这样,wordpress后台设置固定链接 /%post_id%.html建立数据库连接时出错
    2013-02-17 08:14:01
    赞同 展开评论 打赏
  • Rewordpress伪静态研究一天了不幸啊404
    不是很能理解!
    2013-01-19 16:39:42
    赞同 展开评论 打赏
  • Rewordpress伪静态研究一天了不幸啊404
    我也是,搞了半天搞不成。我是ubuntu 64位系统。求达人出现指点!
    2013-01-19 11:31:40
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
SEO学习步骤 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载