周梦康 发表于 2019-10-14 465 次浏览 标签 : Nginx
        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具体可以看这篇博客

评论列表