请帮我写一下ngnix的重写规则:
Actual URL : http://www.example.com/all-dog-breeds.php?Greater-Swiss-Mountain-Dog/82
expected URL : http://www.example.com/Greater-Swiss-Mountain-Dog/82
我尝试了下面的重写网址,但它无效:
rewrite ^/([A-Za-z-]+)\/([0-9]+)\/?$ /all-dog-breeds.php?$1/$2;
rewrite ^/(.*)/(.*)$ /all-dog-breeds.php?$1/$2 last;
答案 0 :(得分:0)