tp5 与 nginx 搭配在根目录和子目录中如何设置伪静态

配置文件参考一下:

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

猜你喜欢

转载自www.cnblogs.com/gavinyyb/p/8905222.html
今日推荐