我想获取user-name和account_id (在例子'1'末尾的数字)从这个URL
http://abc.com/desinger/user-name_1.html
我已经试过这个规则,但我不能得到account_id
rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last;
rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last;
你错过了正则expression式中的.html,应该是
rewrite ^/desinger/(.+)_([0-9]+).html$ /index.php?m=USER&hdn_account_id=$2 last;