thinkphp6配置nginx使带不带index.php都能访问

配置如下内容至nginx配置文件中 然后重启服务

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

猜你喜欢

转载自blog.csdn.net/Qcg0223/article/details/106479596
今日推荐