rewrite ^(.*)list/([0-9]+)-([0-9]+).html$ $1index.php?v=listing&cid=$2&page=$3 last;
rewrite ^(.*)show/([0-9]+)-([0-9]+).html$ $1index.php?v=show&cid=$2&id=$3 last;
//动态改成伪静态-list function tolist($path_info='http://192.168.0.11/index.php?v=listing&cid=14&page=1') { $match = "/^(.*)index.php?v=listing&cid=([0-9]+)&page=([0-9]+)/"; //$path_info = 'http://192.168.0.11/index.php?v=listing&cid=14&page=1'; if(preg_match($match,$path_info,$arr_path)){ return "$arr_path[1]list/$arr_path[2]-$arr_path[3].html"; }else{ return $path_info; } } //动态改成伪静态-show function toshow($path_info='http://192.168.0.11/index.php?v=show&cid=10&id=36') { $match = "/^(.*)index.php?v=show&cid=([0-9]+)&id=([0-9]+)/"; //$path_info = 'http://192.168.0.11/index.php?v=listing&cid=14&page=1'; if(preg_match($match,$path_info,$arr_path)){ return "$arr_path[1]show/$arr_path[2]-$arr_path[3].html"; }else{ return $path_info; } }