thinkphp运行在linux+nginx,如何开启pathinfo模式,我是完整测试过了,没问题的,在thinkphp配置文件 开启    'URL_MODEL'   =>  1,   1代表pathinfo模式

1,第一步 开启pathinfo

php.ini 开启  cgi.fix_pathinfo=1

2,第二步 配置nginx

server {
listen 80;
server_name www.96net.com.cn;
root /var/www/www.96net.com.cn;

location / {

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

location ~ \.php {

fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

}

3,第三步 重启服务

systemctl restart nginx.service

systemctl restart php-fpm.service

最新文章

  1. Android 在线更新apk
  2. 字符串连接,数字tostring,写入文件
  3. MysqlServer如何实现成功卸载,并成功安装
  4. 2015 Multi-University Training Contest 2 1006 Friends
  5. oracle,sqlserver,mysql 命令行 开启、关闭所需要的服务
  6. cpio的简单使用
  7. ios开发入门篇(二):Objective-C的简单语法介绍
  8. ural 1250
  9. Java反编译器安装及各版本介绍
  10. Check SMTP Server Availability for ORA-29278 or ORA-29279 errors using UTL_SMTP to Send Email
  11. Play Modules Morphia 1.2.9a 之 Aggregation and Group aggregation
  12. Linux学习笔记之Django项目部署(CentOS)----进阶篇
  13. C/C++字符串函数使用整理
  14. 使用 PySide2 开发 Maya 插件系列二:继承 uic 转换出来的 py 文件中的类 Ui_Form
  15. A1016. Phone Bills
  16. Laravel创建产品-CRUD之Create and Store
  17. wgrib读grib数据
  18. Linux各种类型压缩包解压缩方法
  19. Xcode 8 的 Debug 新特性 —- WWDC 2016 Session 410 & 412 学习笔记
  20. AngularJS内建服务以及自定义服务的用法

热门文章

  1. Centos安装ifstat统计网络流量
  2. linux Sersync 参数说明
  3. 03机器学习实战之决策树scikit-learn实现
  4. ln 硬链接与软链接
  5. [python 学习] logging模块
  6. flask之创建项目
  7. Spring Aop 动态代理失效分析
  8. TPS、QPS和系统吞吐量的区别和理解
  9. Eclipse 4.9 创建springboot项目步骤
  10. ubuntu18.04-安装最新cmake