请军哥帮忙看一下我的伪静态哪里错了,谢谢
伪静态,conf文件里面的内容是这样的location / {rewrite ^(.*)/f_(.*)_(.*)$ $1/thread.php?fid=$2;page=$3 last;
rewrite ^(.*)/f_(.*)$ $1/thread.php?fid=$2 last;
rewrite ^(.*)/(.*)_(.*)_(.*).html$$1/read.php?tid=$2;page=$3;fpage=$4last;
rewrite ^(.*)/(.*)_(.*).html$ $1/read.php?tid=$2;page=$3last;
rewrite ^(.*)/(.*).html$ $1/read.php?tid=$2 last;
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
}
lnmp restart后就出现错误,请问是不是我的伪静态写的不对?我是网上搜索到的,看别人的回复有成功的,不知道我的错在哪里,请帮忙看看。
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| http://lnmp.org |
+-------------------------------------------+
Stoping LNMP...
Stoping nginx... nginx: unknown directive "page=$3" in /usr/local/nginx/conf/phpwind.conf:2
failed. Use force-quit
Shutting down MySQL.
Gracefully shutting down php-fpm . done
Starting LNMP...
Starting nginx... nginx (pid 4380 4377) already running.
Starting MySQL..
Starting php-fpmdone 你这是什么程序,伪静态有问题里面有 ; 这个在nginx里是一行结束。 谢谢军哥我的是PHPWIND的程序,我修改的帖子是参照这个
http://www.phpwind.net/read/702531
看了你的回复,我把原来的
rewrite ^(.*)/_(.*)_(.*)$ $1/thread.php?fid=$2;page=$3 last;
rewrite ^(.*)/_(.*)$ $1/thread.php?fid=$2 last;
rewrite ^(.*)/(.*)_(.*)_(.*).html$$1/read.php?tid=$2;page=$3;fpage=$4last;
rewrite ^(.*)/(.*)_(.*).html$ $1/read.php?tid=$2;page=$3last;
rewrite ^(.*)/(.*).html$ $1/read.php?tid=$2 last;
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
改成这样了
rewrite ^(.*)/_(.*)_(.*)$ $1/thread.php?fid=$2 last;
rewrite ^(.*)/_(.*)$ $1/thread.php?fid=$2 last;
rewrite ^(.*)/(.*)_(.*)_(.*).html$ $1/read.php?tid=$2 last;
rewrite ^(.*)/(.*)_(.*).html$ $1/read.php?tid=$2 last;
rewrite ^(.*)/(.*).html$ $1/read.php?tid=$2 last;
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last;
;后面的都删了,测试了一下能实现伪静态了,不知道这样有没有后遗症,请帮忙看一下。谢谢
回复 3# 的帖子
这个不清楚是否会有后遗症,你可以多测试看看 好的,谢啦……:lol
页:
[1]