location / {
rewrite ^/detail/(.*).html$ /index.php?t=detail&id=$1 last;#permanent
rewrite ^/list/(\w+)/(\w+)/(\w+).html$ /index.php?t=list&id=$1&cid=$2&p=$3 last;
rewrite ^/list/(\w+)/(\d+).html$ /index.php?t=list&id=$1&cid=0&p=$2 last;
}
server{
....
error_log logs/error1.log notice;
rewrite_log on;
}
if (!-e $request_filename){
return 301 http://localhost:801/?$request_filename ;
}
#拆分路径和参数
rewrite ^(.*)?(.*)$ /in.php?$1$2 last;