For example, if I want to rewrite the following route: /user?id=55/question to /dispatch, how should I write it?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
location /question/ { rewrite ^/question(.*) /dispatch$1 last; } location /user/ { if ($query_string = "id=55") { rewrite ^/user(.*) /dispatch$1 last; } }
location /question/ {
rewrite ^/question(.*) /dispatch$1 last;
}
location /user/ {
if ($query_string = "id=55") { rewrite ^/user(.*) /dispatch$1 last; }
location /question/ {
}
location /user/ {
}