你能帮我写nginx的重写规则吗:
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
我在下面尝试重写 URL 但它不起作用:
rewrite ^/([A-Za-z-]+)\/([0-9]+)\/?$ /all-dog-breeds.php?$1/$2;
rewrite ^/(.*)/(.*)$ /all-dog-breeds.php?$1/$2 last;
最佳答案
关于regex - 两个php参数的nginx重写规则,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31901026/