当前位置:首页 > 服务器技术 > nginx

Thinkphp32Nginx伪静态写法15年7月最新有效

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

 }

在server 中创建如上内容。

然后保存,重新加载就可以了。

经过试验 http://doc.thinkphp.cn/manual/hidden_index.html 写的无效!!!

版权声明:本文为博主原创文章,未经博主允许不得转载。

以上就介绍了Thinkphp 32 Nginx 伪静态写法15年7月最新有效,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!