Home  >  Q&A  >  body text

nginx rewrite rules do not take effect

After adding the following rewrite rule, requesting the html file did not add ?mode=test

location / {
        rewrite ^/(.*).html$ /.html?mode=test break;
        error_page 404 = @nodejs;
}
我想大声告诉你我想大声告诉你2713 days ago623

reply all(1)I'll reply

  • 某草草

    某草草2017-05-16 17:22:38

    break will not modify the URL and will not re-initiate the request.

    reply
    0
  • Cancelreply