军哥,帮忙看一下!是什么元因?
http://www.jjlamu.com/ecstore/结果是:
下载了一个文件download
http://www.jjlamu.com/mshop/install
结果是:
下载了一个文件install
http://www.jjlamu.com/bbs
正常显示
二级目录伪静态规则为:
location /mshop/install/ {
index index.html index.php;
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 ^/mshop/install/(.*)$ /mshop/install/index.php;
}
}
location /ecstore/ {
index index.html index.php;
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 ^/ecstore/(.*)$ /ecstore/index.php;
}
}
location /bbs/ {
root /home/wwwroot/www.jjlamu.com;
index index.php index.html forum.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?q=$1 last;
rewrite "^/index.html$" /index.php last;
rewrite "^/index\.html" /index.php last;
rewrite "^/category$" /index.php last;
rewrite ^/bbs/archiver/((fid|tid)-+.html)$ /bbs/archiver/index.php?$1 last;
rewrite ^/bbs/forum-(+)-(+).html$ /bbs/forumdisplay.php?fid=$1&page=$2 last;
rewrite ^/bbs/thread-(+)-(+)-(+).html$ /bbs/viewthread.php?tid=$1&extra=page%3D$3&page=$2 last;
rewrite ^/bbs/space-(username|uid)-(.+).html$ /bbs/space.php?$1=$2 last;
rewrite ^/bbs/tag-(.+).html$ /bbs/tag.php?name=$1 last;
rewrite ^([^\.]*)/forum-(\w+)-(+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
rewrite ^([^\.]*)/group-(+)-(+)\.html$ $1/forum.php?mod=group&fid=$2&page=$3 last;
break;
}
}
军哥,请你过目!十分感谢!
我调了好几天了,十分郁闷!nginx伪静态规则也仔细看了,不太明白,就是通过不了,好像后台nginx不反回页面内容,而返回一个文件一样,此文件就是二级目录下的index.php文件,字节数相同。辛苦军哥帮忙解决。 用的什么程序,就去他们官网找个对应程序的nginx伪静态,如果是二级目录就找个对应程序的二级目录的伪静态
页:
[1]