我想要做的是:
domain.com/account/manage/somekey/ -> domain.com/account/manage/?key=somekey
domain.com/account/manage/somekey/settings/ -> domain.com/account/manage/settings/?key=somekey
somekey 是一个包含 AF,af,0-9 长度为 24 个字符的字符串。
这是我的第一个,但我不确定如何做第二个。
location /account/manage/ {
rewrite "^/account/manage/([A-Fa-f0-9]{24})/(.*)$" /account/manage/?key=$1;
}