nginx伪静态规则重写

location / {
        if (!-e $request_filename){
                rewrite  ^/index.php/(.*)$  /index.php?s=$1  last;
                rewrite  ^/admin.php/(.*)$  /admin.php?s=$1  last;
                rewrite  ^(.*)$  /index.php?s=$1  last;   break;
        }
}

 

posted @ 2024-12-07 16:30  流浪2024  阅读(2)  评论(0编辑  收藏  举报