站点域名的配置:xxx.com.conf

server {
listen 80;
root /www/web/xxx_com/public_html;
server_name xxx.com;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
error_page 503 /errpage/503.html;
location ~ \.php(.*)$ {
fastcgi_pass unix:/tmp/php-70-cgi.sock;
fastcgi_index index.php;
#fastcgi_param SCRIPT_FILENAME $DOCUMENT_ROOT$fastcgi_script_name;
#fastcgi_param PATH_INFO $2;
include fcgi.conf;
       #下面追加的
set $real_script_name $fastcgi_script_name;
set $path_info "";
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info
;
}
location ~ /\.ht {
deny all;
}
location / {
       #伪静态重写的
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break
;
}

try_files $uri $uri/ /?$args;
}
}

WDCP配置ThinkPHP5伪静态隐藏index.php,出现“”解决重定向次数过”问题的更多相关文章

  1. tp5,thinkphp5,隐藏index.php,隐藏入口文件

    一.找到/public/.htaccess文件 Apache: <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews R ...

  2. IIS7下配置web.config隐藏index.php

    <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.we ...

  3. nginx 隐藏 index.php 和 开启 pathinfo 模式的配置

    nginx 通过 location 的规则匹配将 php 转发给 php-fpm 处理后获取结果然后返回给客户端,转发模式可以通过 unix sock 或 tcp socket 方式.百度了好多文章我 ...

  4. lnmp1.4 nginx配置thinkphp5

    vhost/xxx.conf配置图,重点是红色框框 研究了两三天 ,至此thinkphp5 路由,隐藏index.php全部解决 感谢网友的分享:http://blog.csdn.net/gaoxiu ...

  5. Nginx隐藏index.php和配置vhost

    nginx启动命令 启动:nginx停止:nginx -s stop退出:nginx -s quit重启:nginx -s reopen重新加载:nginx -s reload平滑启动:kill -H ...

  6. ThinkPHP5 隐藏index.php问题

    隐藏index.php 可以去掉URL地址里面的入口文件index.php,但是需要额外配置WEB服务器的重写规则. 以Apache为例,需要在入口文件的同级添加.htaccess文件(官方默认自带了 ...

  7. [转]ThinkPHP5 隐藏index.php问题

    ThinkPHP5 隐藏index.php问题 Apache,修改.htaccess文件 ----------------------------------------------------- R ...

  8. nginx配置隐藏index.php

    Nginx 服务器隐藏 index.php 配置   location / { try_files $uri $uri/ /index.php?$query_string; }   nginx配置中t ...

  9. Yii2.0简单隐藏index.php文件和模块配置和layout布局配置禁用和日志写入配置

    隐藏index.php文件 目的:想去掉浏览器地址栏中的 index.php?r= 这一块. 在/config/web.php中   ’components'=>[]   中添加如下代码: 'u ...

随机推荐

  1. Vue路由的hash模式与history模式的区别?

    1.首先router有两种模式:hash模式(默认).history模式(需配置mode: 'history') hash和history的区别?   hash                    ...

  2. 汉语拼音转换工具包pypinyin

    #pip install pypinyin汉字转换汉语拼音 from pypinyin import lazy_pinyin,TONE,TONE2,TONE3 str="你知道我是谁吗?&q ...

  3. k8s搭建实操记录干货二(node)

    #注:172.16.110.111为master,172.16.110.112\114为node1\node2(kubeadm join部分要等master完成后手工操作,其它可执行本脚本一键安装) ...

  4. apache.zookeeper-3.4与apache.kafka-2.11的安装

                                           zookeeper与Kafka集群安装 集群安装以三台机器(虚拟机,物理机等等)为例子: 192.168.200.100 ...

  5. 深入理解Java虚拟机(1)

        对于Java程序员,在虚拟机自动内存管理机制的帮助下,不需要再为每一个操作写配对的释放资源操作,不容易出现内存泄露和内存溢出问题.加深对Java虚拟机的理解,有助于在发现问题时精准定位问题,排 ...

  6. java数值类型之间的转换

    说明:图中6个实心箭头代表转换无信息丢失,3个虚线箭头表示可能有精度损失的转换.

  7. css不换行解决

    word-wrap: break-word; word-break: break-all; white-space: pre-wrap;

  8. springboot restful接口 如何接受前端的PUT和DELETE请求

    最近项目组有人问我,"springboot怎么接受不到前端提交的PUT和DELETE请求?" 于是有了这篇文章,本篇文章主要解决两个问题: js好像只能提交GET.POST请求耶? ...

  9. 2/3/4G网络架构

    1通讯网络演进 1.1 概念名词 LTE=Long Term Evolution=长期演进, 是3GPP制定的高数据率.低时延.面向分组域优化的新一代宽带移动通信标准项目. E-UTRAN 无线接入网 ...

  10. 【深度学习】PyTorch之Squeeze()和Unsqueeze()

    1. unsqueeze() 该函数用来增加某个维度.在PyTorch中维度是从0开始的. import torch a = torch.arange(0, 9) print(a) 结果: tenso ...