全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 2485|回复: 8

求助:在lnmp下,非根目录设置wp的固定链接的设置

[复制链接]
发表于 2011-1-27 19:59:17 | 显示全部楼层 |阅读模式
在的VPS服务器环境是用lnmp0.5搭建的,所有的网站程序都放在/home/wwwroot/下,其中有一个WP博客放在/home/wwwroot/vieway下。
我在VPS上用命令安装虚拟主机时,已天际wordpress.conf,但是当我的博客安装好后,我进入后台设置固定链接时,却多了一个index.php,例如/index.php/%year%/%monthnum%/%postname%/ ,我想把这个/index.php去掉,我尝试了许多方法都没有解决问题,是路径设置问题吗?还是其它?


[ 本帖最后由 vieway 于 2011-1-27 20:03 编辑 ]
发表于 2011-1-28 00:26:17 | 显示全部楼层
看了半天 没明白
发表于 2011-1-28 10:01:07 | 显示全部楼层
勾选Custom Structure 后面填上/%year%/%monthnum%/%postname%/
发表于 2011-1-28 14:05:11 | 显示全部楼层

回复 1# 的帖子

直接在Custom Structure  删掉index.php不可以?
 楼主| 发表于 2011-1-28 18:51:14 | 显示全部楼层
问题补充:
我的WP博客放在home/wwwroot/tpimage下,其中这个网站的conf是
  1. server
  2. {
  3.   listen       80;
  4.   server_name www.tpimage.net;
  5.   index index.html index.htm index.php default.html default.htm default.php;
  6.   root  /home/wwwroot/tpimage;
  7.   include /wordpress.conf;
  8.   location ~ .*\.(php|php5)?$
  9.    {
  10.     fastcgi_pass  unix:/tmp/php-cgi.sock;
  11.     fastcgi_index index.php;
  12.     include fcgi.conf;
  13.    }
  14.   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  15.    {
  16.     expires      30d;
  17.    }
  18.   location ~ .*\.(js|css)?$
  19.    {
  20.     expires      12h;
  21.    }
  22.   access_log off;
  23. }
复制代码
另外wordpress.conf是
  1. location / {
  2. if (-f $request_filename/index.html){
  3.                 rewrite (.*) $1/index.html break;
  4.         }
  5. if (-f $request_filename/index.php){
  6.                 rewrite (.*) $1/index.php;
  7.         }
  8. if (!-f $request_filename){
  9.                 rewrite (.*) /index.php;
  10.         }
  11. }
复制代码
 楼主| 发表于 2011-1-28 18:51:44 | 显示全部楼层

回复 4# 的帖子

不行的,没有用的
 楼主| 发表于 2011-1-28 18:52:21 | 显示全部楼层

回复 3# 的帖子

设置我会,但是问题是有一个/index.php/在哪里,删除也不行
 楼主| 发表于 2011-2-9 12:02:38 | 显示全部楼层
有没有人知道解决办法啊
发表于 2011-2-10 14:29:44 | 显示全部楼层
不懂……建议去wp论坛问问。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-6-5 21:05 , Processed in 0.060875 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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