全球主机交流论坛
标题:
求助:在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是
server
{
listen 80;
server_name www.tpimage.net;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/tpimage;
include /wordpress.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
access_log off;
}
复制代码
另外wordpress.conf是
location / {
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;
}
}
复制代码
作者:
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