I added the following rewrite rule, and then an error was reported. Why is this a cycle?
location / {
rewrite ^/(.*).html$ /.html?mode=test last;
error_page 404 = @nodejs;
}
Didn’t I add $ at the end of the regular expression? After rewriting it once, .html
is no longer at the end, and there is ?mode=test
after it, so this regular expression will no longer be matched. Yeah
last changed to break...