2

如何在 nginx 中编写配置以重写以下 url: domain.com/index.php?page=homeintodomain.com/index.php?page=m-home

4

3 回答 3

1
if ($args ~* (.*)(page=home)(.*)){
set $args $1page=m-home$3;
}
于 2013-06-18T08:01:14.777 回答
-1
rewrite ^/index.php?page=(.+?)&(.*)$ /index.php?page=m-$1&$2 break;
于 2013-02-02T19:56:44.820 回答
-1
rewrite ^/index.php?page=m-(.*) /index.php?page=$1 last;
于 2013-02-01T02:53:45.117 回答