centOS7.4 thinkPHP nginx 支持pathinfo和rewrite
server
{
listen 80;
server_name www.demo.com mayifanx.com;
root /data/www/demo;
index index.php index.html index.htm; #红色部分支持rewrite
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last;
}
} location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; #蓝色部分是支持pathinfo
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info; include fastcgi_params; }
}
centOS7.4 thinkPHP nginx 支持pathinfo和rewrite的更多相关文章
- [转]Nginx+ThinkPHP不支持PathInfo的解决办法
FROM : http://www.4wei.cn/archives/1001174 应集团要求,公司的服务器全收到集团机房统一管理了,失去了服务器的管理配置权限. 杯具就此开始. 首先要解决文件大小 ...
- nginx支持pathinfo模式
很久不使用apache了,渐渐对apache感到陌生,因为朋友有个ZendFramework框架从apache移到nginx下,需要pathinfo模式支持.网上海搜于是开始搜索nginx+pathi ...
- 配置Nginx支持pathinfo模式
Nginx服务器默认不支持pathinfo, 在需要pathinfo支持的程序中(如thinkphp),则无法支持”/index.php/Home/Index/index”这种网址.网上流传的解决办法 ...
- nginx支持pathinfo并且隐藏index.php
How To Set Nginx Support PATHINFO URL Model And Hide The /index.php/ 就像这样 The URL before setting lik ...
- 使得nginx支持pathinfo访问模式
原理: 任意创建一个 in.php 文件: <?php echo '<pre>'; ...
- 使nginx支持pathinfo模式
在将fastadmin部署到虚拟机中时,遇到如下问题:当访问登录页面时,页面进行不断的循环跳转重定向.解决方法是将nginx配置为支持pathinfo的模式 以下是nginx中的配置内容: locat ...
- 让Nginx支持pathinfo
# 典型配置 location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_ ...
- 让thinkphp 5 支持pathinfo 的 nginx ,去掉index.php
在TP5.0中查阅tp5官方文档,注意:5.0取消了URL模式的概念,并且普通模式的URL访问不再支持.phthinfo 是什么? PHP中的全局变量$_SERVER['PATH_INFO']是一个很 ...
- nginx支持pathinfo
server { root /webserver/www/api; listen ; server_name api.dnxia.com; location / { if (!-e $request_ ...
随机推荐
- 在DO搭建自己的ss
前期准备: 1.一个paypal账户 2.国外的一台VPS paypal的注册需要一个邮箱和一张信用卡即可. VPS的话经过搜索对比,决定使用DigitalOcean的.(点击此链接注册DO可获得10 ...
- bootstrap-datetimepicker 滚动错位问题
问题:在页面上弹出控件的时候,滚动后面页面,时间控件就会错位. 解决方法1: 搜索bootstrap-datetimepicker.js里面的"show:"方法,在this.pla ...
- Let's encrypt申请泛域名证书
1.下载工具 wget https://dl.eff.org/certbot-auto chmod a+x ./certbot-auto 2.初始化 ./certbot-auto 3.获取证书(1) ...
- Cisco路由器DHCP配置浅析
enable config terminal (进入配置模式) ip dhcp pool global(配置一个根地址池,global是地址池的名称,你可以采用有意义的字符串来表示) config ...
- django自带过滤器大全
1.可以通过过滤器来修改变量的显示,过滤器的形式是:{{ variable | filter }},管道符号'|'代表使用过滤器 2.过滤器能够采用链式的方式使用,例如:{{ text | escap ...
- Pantone色卡——安全装备的面板、丝印及铭牌颜色设计参考
可以参考上传文件<Pantone色卡电子版下载>
- 001-project基本使用
一.概述 Project工具一般用来管理一个项目,制定项目的执行计划.这个项目可以是临时性的工作,可以是IT项目.工程类项目,也可是结婚这一事情,项目的特点是产生唯一性的成果或最终结果. 项目的三要素 ...
- SVG Use(转)
转自:http://www.zhangxinxu.com/wordpress/2014/07/introduce-svg-sprite-technology/ 未来必热:SVG Sprite技术介绍 ...
- Maven项目settings.xml的配置
原文地址 http://www.cnblogs.com/DreamDrive/p/5571916.html 在Maven中提供了一个settings.xml文件来定义Maven的全局环境信息.这个文件 ...
- JS 中的substring ,substr ,slice,split,join
substr with different arguments passed in: str.substring(startNum,stopNum ); str.slice(startNum,stop ...