我正在尝试从此 URL 中获取user-name
and account_id
(示例末尾的数字“1”)
我试过这个规则,但我无法得到account_id
rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last;
答案1
rewrite ^/desinger/(.+)_([0-9]+)$ /index.php?m=USER&hdn_account_id=$2 last;
你的正则表达式中缺少 .html,它应该是
rewrite ^/desinger/(.+)_([0-9]+).html$ /index.php?m=USER&hdn_account_id=$2 last;