首页 > 技术文章 > nginx 配置支持 TP框架

zyjfire 2018-04-25 16:41 原文

没错 只需一句话 一切搞定 nginx 配置文件 添加这条代码即可

location / {
  rewrite ^(.*)$ /index.php?s=$1 last;
}

 或

try_files $uri $uri/ /index.php?$query_string;

  

推荐阅读