标签: nginx url-rewriting
Nginx是否可以像这样重写URL?
http://www.example.com/city/person/contact.php?id=name
到
http://www.example.com/city/person/name/contact
答案 0 :(得分:0)
怎么样:
location ~ /city/person/(.*)/(.*) { rewrite ^/city/person/$2.php?id=$1 last; }