In nginx, This example shows the rewriteexample (%0-9%%5%%%.html $ x. jsp? Id1_1last is beyond the control of law. The solution is to add two dual-index rewritenumbers (%0-9%%5%%%.html $ x. jsp? Id $1 last; So OK, it can be said that it is fully compatible with the apache syntax, just change the RewriteRule to Rewrite, followed
Write rules like this in nginx
ReWrite^/(%0-9%%5%%%.html $/x. jsp?Id= $1 last;
Cannot be started. The solution is to add two double quotation marks
Rewrite ^/(%0-9%%5%%%%.html $/x. jsp? Id = $1 last;
This is OK. It can be said that it is fully compatible with the apache syntax. You only need to change the RewriteRule to Rewrite, and the subsequent changes can be as follows:
[R]-> rEdIrect;
[P]-> last;
[R, L]-> redirect;
[P, L]-> last;
[PT, L]-> last;
Nginx rewrite supports four types of redirection:
Jump type
Redirect: 302 jump to the address after rewrite
PeRmAnent: 301 is permanently directed to the address after rewrite, which is more friendly to search engines.
Proxy type
Last: re-run the rewrite address in the server tag.
Break: place the address after rewrite in the current loCatExecute in ion label