Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 nginx 中编写配置以重写以下 url: domain.com/index.php?page=homeintodomain.com/index.php?page=m-home
domain.com/index.php?page=home
domain.com/index.php?page=m-home
if ($args ~* (.*)(page=home)(.*)){ set $args $1page=m-home$3; }
rewrite ^/index.php?page=(.+?)&(.*)$ /index.php?page=m-$1&$2 break;
rewrite ^/index.php?page=m-(.*) /index.php?page=$1 last;