sdfarmer 发表于 2017-4-10 13:36:56

用这个这个伪静态,生成的静态文件就打不开了

location / {
rewrite "^/(.+?)-(.+?)-(.+?)\.html$" /e/action/ListInfo.php?classid=$1&ph=1&fenlei=$2&tempid=$3 last;
}
已经生成静态文件的内容页面/xx/2016-10-03/43861.html打不开了

klon99 发表于 2017-4-10 14:45:21

干脆把html改成htm

天九 发表于 2017-4-10 14:57:41

location / {
    if (!-e $request_filename) {
    rewrite "^/(.+?)-(.+?)-(.+?)\.html$" /e/action/ListInfo.php?classid=$1&ph=1&fenlei=$2&tempid=$3 last;
    }
}
yc022t 试试

cgs3238 发表于 2017-4-10 15:20:54

location / {
        try_files $uri $uri/ @weijingtai;
}

location @weijingtai {
        rewrite "^/(.+?)-(.+?)-(.+?)\.html$" /e/action/ListInfo.php?classid=$1&ph=1&fenlei=$2&tempid=$3 last;
}
页: [1]
查看完整版本: 用这个这个伪静态,生成的静态文件就打不开了