php配置
learn
learn 2018-10-13 15:35:24
0
4
1319

Nginx 如何配置来隐藏public/index.php 入口文件

learn
learn

全部回复(3)
胤彬-

vhost 配置

server {

        Listen       80;

      server_name  test.cn ;

        root   "D:ceshi888lhyun";

include "rewrite/thinkphp.conf";

        索引索引.html 索引.htm 索引。 php;

#location {

        #    

        #    #autoindex  on;

        #}

        位置 ~ .php(.*)$ {

            fastc gi_pass 127.0.0.1:9000;

            fastcgi_index index.php;

            fastcgi_split_path_info  ^((?U).+.php)(/?.+)$;

            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

            fastcgi_param  PATH_INFO $fastcgi_path_info;

            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;

            包括        fastcgi_params ;

        }

}


thinkphp.conf

位置 / {

    if (!-e $request_filename) {

        重写 ^(.*)$ /index.php?s=/$1 最后;

        休息;

  }

}




Justin

thinkphp隐藏index.php

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!