MJJ论坛

 找回密码
 注册
查看: 3547|回复: 8

[已解决] 求救,Wordpress固定链接问题

[复制链接]
发表于 2012-10-14 17:23:15 | 显示全部楼层 |阅读模式
环境是Nginx+MySQL,自己手工搭建的,现在wordpress后台设置固定链接“/%post_id%.html”,查看文章出现404,请各位大神说说这个原因,如何解决
发表于 2012-10-14 17:27:37 | 显示全部楼层
同用Nginx的路过。。

伪静态看这里

http://gevin.me/145.html
发表于 2012-10-14 17:29:53 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2012-10-14 17:32:41 | 显示全部楼层
楼上正解。
 楼主| 发表于 2012-10-14 17:38:41 | 显示全部楼层
单手摘月 发表于 2012-10-14 17:29
location / {
if (-f $request_filename/index.html){
                rewrite (.*) $1/index.html break; ...


重启nginx 提示错误
/usr/local/webserver/nginx/sbin/nginx -s reload
[emerg]: "location" directive is not allowed here in /usr/local/webserver/nginx/conf/nginx.conf:128

我是在最后面添加的
发表于 2012-10-14 17:52:38 | 显示全部楼层
那个是apache的规则。。。。
发表于 2012-10-14 21:59:09 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
发表于 2012-10-14 22:35:00 | 显示全部楼层
貌似你的写个规则,pm我帮助你
发表于 2012-10-14 22:46:17 | 显示全部楼层
单手摘月 发表于 2012-10-14 21:59
要在倒數第二行添加。。。。不會用就直接裝一鍵包好了。。。。

月月神奇。月月合体
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|MJJ论坛

Copyright MJJ论坛 © 2022 All Rights Reserved.

快速回复 返回顶部 返回列表