今天弄了个别人的项目,用的tp5,正好前段时间学tp5了,可是人家竟然用了rewrite,我没学过啊,放在nginx ,全是404,真尴尬

其实很简单,在配置文件里面添加一小段代码就ok了

时间紧张直接把配置文件放出来

server {
listen ;
server_name test.wqzsub.com;
location / {
root /var/www/test;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
/*主要加了这一块*/
} location ~ \.php$ {
root /var/www/test;
fastcgi_pass unix:/run/php/php7.-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

最新文章

  1. linux中rz中的-e选项
  2. ASP.NET MVC Layout 嵌套
  3. python 安装pillow
  4. java导出excel表格
  5. 常用汉字的Unicode码表
  6. spring-cloud-feign案例
  7. SharePoint 2013 入门教程--系列文章
  8. Jquery+asp.net后台数据传到前台js进行解析的方法
  9. 安装Intel HAXM为Android 模拟器加速,30秒内启动完成
  10. 【转】TI-Davinci开发系列之六CCS5.2调试Linux内核
  11. java程序获得SqlServer数据表的表结构
  12. 文字超出DIV后,隐藏文字并显示...
  13. PCMM(人力资源能力成熟度模型)V2.0中英对照版发布
  14. cocos2dx-lua中handler解析
  15. 十二、针对单个工程来配置jdk版本
  16. shell脚本学习-练习写一个脚本2
  17. 【排列组合】ZSC1076: 数学、不容易系列之三——考新郎
  18. 用注册表禁止windows添加新用户
  19. Jenkins 学习笔记(一)
  20. SuSE 网卡配置模板

热门文章

  1. Controller-->View传值的几种方法
  2. python接口自动化测试之http协议(一)
  3. AcWing 1012. 友好城市
  4. 基于约束条件的SQL攻击
  5. 记录 shell学习过程(4)for 循环
  6. 【Python】循环控制保留字
  7. django--关于部署scrapyd项目报错问题
  8. 「题解」「CF1019B」The hat
  9. 题解【洛谷P1347】排序
  10. 题解 【Codeforces489B】 BerSU Ball