if ($request_uri ~* "^/index.php\?itemid=(\d+)&moduleid=(\d+)$") {
set $myarg1 $1;
set $myarg2 $2;
rewrite .* https://m.domain.com/$myarg2-0-$myarg1-1.html? permanent;
}
//参数顺序不同,可以写两条就是了
The ngnix 301 jump needs to be handled separately for the original link with a question mark