直接贴代码了。

server {
        listen       80;
        server_name  127.0.0.1;
        index  index.html index.htm index.php l.php;
        #charset koi8-r;


        #access_log  logs/host.access.log  main;
        root    "C:/sky/myphp_www/PHPTutorial/WWW/tp_push/public";
       # location / {
           # index  index.html index.htm index.php l.php;
          # autoindex  off;
       # }
        #URL重写
       location / { 
          if (!-e $request_filename) {
    rewrite  ^(.*)$  /index.php?s=/$1  last;
          }

       }



还有一种:

phpstudy nginx环境下,tp5.1重写规则

相关文章:

  • 2022-12-23
  • 2021-06-15
  • 2022-12-23
  • 2021-04-22
  • 2021-09-15
  • 2021-11-02
  • 2021-07-24
  • 2022-12-23
猜你喜欢
  • 2021-05-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2021-08-20
相关资源
相似解决方案