ngnix dynamic page 301 regular jump to pseudo static page

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

Guess you like

Origin blog.csdn.net/qq_41608099/article/details/90292976