1.打开nginx.conf配置文件

2.对比如下配置

使用phpstudy搭建tp5.0与nginx tp5.0路由没用、无法使用的配置记录

箭头所指是我的public目录,在下面的location / {} 中 添加root   跟上面的root一样   然后添加if的内容即可。

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

原理待更新。。。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-09
  • 2021-12-26
  • 2021-12-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-28
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-04-18
  • 2021-04-26
  • 2022-12-23
相关资源
相似解决方案