set $go2dev 1;
if ($uri ~ "^/read/(\d+)\.html") {
set $go2dev 0;
}
if ($uri ~ "^/simple/t(\d+)\.html") {
set $go2dev 0;
}
if ($uri ~ "^/mobile/read/(\d+)\.html") {
set $go2dev 0;
}
if ($uri ~ "^/mobile/simple/t(\d+)\.html") {
set $go2dev 0;
}
if ($go2dev = 1) {
rewrite ^(.*)$ https://mengkang.net/ask? permanent;
}
不推荐使用$uri
具体可以看这篇博客