For example, if I want to rewrite the following route:
/user?id=55
/question
to /dispatch, how should I write it?
PHP中文网2017-05-16 17:15:34
location /question/ {
rewrite ^/question(.*) /dispatch$1 last;
}
location /user/ {
if ($query_string = "id=55") {
rewrite ^/user(.*) /dispatch$1 last;
}
}
世界只因有你2017-05-16 17:15:34
location /question/ {
rewrite ^/question(.*) /dispatch$1 last;
}
location /user/ {
if ($query_string = "id=55") {
rewrite ^/user(.*) /dispatch$1 last;
}
}