全球主机交流论坛

标题: 求助:在lnmp下,非根目录设置wp的固定链接的设置 [打印本页]

作者: vieway    时间: 2011-1-27 19:59
标题: 求助:在lnmp下,非根目录设置wp的固定链接的设置
在的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 编辑 ]
作者: cnweb    时间: 2011-1-28 00:26
看了半天 没明白
作者: cyberdog    时间: 2011-1-28 10:01
勾选Custom Structure 后面填上/%year%/%monthnum%/%postname%/
作者: Timbaland    时间: 2011-1-28 14:05
标题: 回复 1# 的帖子
直接在Custom Structure  删掉index.php不可以?
作者: vieway    时间: 2011-1-28 18:51
问题补充:
我的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. }
复制代码

作者: vieway    时间: 2011-1-28 18:51
标题: 回复 4# 的帖子
不行的,没有用的
作者: vieway    时间: 2011-1-28 18:52
标题: 回复 3# 的帖子
设置我会,但是问题是有一个/index.php/在哪里,删除也不行
作者: vieway    时间: 2011-2-9 12:02
有没有人知道解决办法啊
作者: qun    时间: 2011-2-10 14:29
不懂……建议去wp论坛问问。




欢迎光临 全球主机交流论坛 (https://lilynana.eu.org/) Powered by Discuz! X3.4