tp6多应用隐藏入口文件

Nginx 1.16.1版本,用的phpstudy。

网上的的文章都要看吐了,一人原创之后万人原创,但是
没一个有用的。

打开phpstudy选择 网站,在列表后面有个菜单还是更多(忘记了),选择伪静态,输入下面的配置。

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

//我用的路由
//要把 a.com/index.php/test
//变成 a.com/test
//只需要把?s=去掉就行
location / { 
   if (!-e $request_filename) {
   rewrite  ^(.*)$  /index.php$1  last;
   break;
    }
}

你可能感兴趣的:(笔记)