nginx error: rewrite or internal redirection cycle
習慣沉默
習慣沉默 2017-05-16 17:20:40
0
1
994

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

習慣沉默
習慣沉默

reply all(1)
仅有的幸福

last changed to break...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template