nginx 规则
location ~ /test/(.*) {
proxy_pass https://xxx/test.php?$1;
}
php代码
<?php
echo $_SERVER['REQUEST_URI'];
echo "\r\n";
结果
#curl http://xxx/test/123456
/test.php?123456
#curl http://xxx/test/12?132
/test.php?12