隐藏index.php

 server {
listen 80;
server_name yourdomain.com;
root /home/yourdomain/www/;
index index.html index.htm index.php; if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
} location ~ .*\.php(\/.*)*$ {
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
} access_log logs/yourdomain.log combined;
}

配置path_info  

server {
listen 80;
server_name test.local; location / {
root /www/test;
index index.html index.htm index.php;
rewrite ^(.*)$ /index.php$1 last;
}
	location ~*  \.php {
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.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_pass unix:/tmp/php-fpm.sock;
include fastcgi_params;
}
}

  

最新文章

  1. 列表list
  2. JAVA-多屏幕显示
  3. Bootstrap – 1.认识
  4. Unity游戏开发之“屏幕截图”
  5. PHP函数补完:stream_context_create()模拟POST/GET
  6. OC基础(8)
  7. MFC中GetPrivateProfileString相关函数
  8. 如何让自己的电脑发布ASP http://jingyan.baidu.com/article/19192ad853224ce53f570748.html
  9. UVALive 6609 Minimal Subarray Length (查找+构建排序数组)
  10. Wireshark - 过滤规则
  11. ADO.NET—两种连接模式
  12. linux C语言处理正则表达式
  13. Nginx的负载均衡 - 一致性哈希 (Consistent Hash)
  14. Java集合源码分析之LinkedList
  15. [转] Understanding-LSTMs 理解LSTM
  16. 菜鸟学Java(二十二)——重新认识泛型
  17. string.Format格式化输出
  18. Android如何运行真机在eclipse上调试应用?
  19. (原)tensorflow中finetune某些层
  20. SQL分页参数传值 在存储过程中使用 动态SQL实现

热门文章

  1. xshell连接虚拟机linux系统失败问题
  2. 使用GitLab创建项目
  3. IDEA 破解图文教程 - 2018.9 更
  4. Python操作摄像头
  5. 安装好Oracle Client以后没有tnsnames.ora文件
  6. 你应该知道的PHP库
  7. Full Binary Tree(二叉树找规律)
  8. Scrum立会报告+燃尽图(十月十八日总第九次):功能细化与数据库设计
  9. 王者荣耀交流协会第一次Scrum立会
  10. Bate版本控制报告