server {
listen 80;
server_name localhost;
root D:\workspace\PHP\Atromic; location / {
index index.php index.html index.htm;
if (-e $request_filename) {
break;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}
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 127.0.0.1:9010;
include fastcgi_params;
}
}

Nginx配置REWRITE隐藏index.php的更多相关文章

  1. 【Nginx】Nginx配置REWRITE隐藏index.php

    只需要在server里面加上 if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; }

  2. Nginx配置PATHINFO隐藏index.php

    1.网络来源:http://www.shouce.ren/post/view/id/1529 server {      listen       80;     default_type text/ ...

  3. nginx 环境 thinkphp 隐藏index.php

    tp官网已经写了 http://doc.thinkphp.cn/manual/hidden_index.html 不生效 重启nginx .问题依旧 kill掉nginx进程  再启动 贴段自己的配置 ...

  4. nginx 配置rewrite 笔记

    nginx 配置rewrite笔记: 通过下面的示例来说明一下,1. 先说说location : location 表示匹配传入的url地址,其中配置符有多种,各种情况的意义不一样: location ...

  5. TP5框架 nginx服务器 配置域名 隐藏index.php

    server { listen ; #server_name localhost; server_name hhy.com;/**这里写自己的域名*/ #charset koi8-r; #access ...

  6. nginx下重写隐藏index.php文件

    location / { root /项目目录/; index index.php; if (-f $request_filename/index.php){ rewrite (.*) $1/inde ...

  7. nginx配置rewrite

    1. uri  和 url读取区别 区别就是URI定义资源,而URL不单定义这个资源,还定义了如何找到这个资源. 比如说,一个服务器上,到一个文件夹/网页的绝对地址(absolute path)就是U ...

  8. 修改Nginx配置文件来隐藏index.php

    找到你要修改的域名对应nginx配置文件(vhost下),添加如下代码 location / { if (!-e $request_filename) { rewrite ^(.*)$ /index. ...

  9. nginx下Thinkphp 隐藏index.php

    thinkphp config配置: 'URL_MODEL' => '2', //URL模式 nginx rewrite配置: location / { if (!-e $request_fil ...

随机推荐

  1. Spring Boot 使用 JWT 进行身份和权限验证

    上周写了一个 适合初学者入门 Spring Security With JWT 的 Demo,这篇文章主要是对代码中涉及到的比较重要的知识点的说明. 适合初学者入门 Spring Security W ...

  2. SpringJDBC源码解析

    读完本篇文章需要很长很长时间.... 传统JDBC 相信大家对传统的jdbc已经很熟悉了,无非就是下面这个流程 1234567891011 //1.加载驱动程序Class.forName(" ...

  3. sql server 大数据, 统计分组查询,数据量比较大计算每秒钟执行数据执行次数

    -- 数据量比较大的情况,统计十分钟内每秒钟执行次数 ); -- 开始时间 ); -- 结束时间 declare @num int; -- 结束时间 set @begintime = '2019-08 ...

  4. android 实时获取网速

    public class NetSpeed { private static final String TAG = NetSpeed.class.getSimpleName(); private lo ...

  5. MySQL容器化详细教程

    前言:  上篇文章介绍了Docker工具的安装及常用命令使用.本篇文章我们会介绍如何在Docker中运行MySQL实例,可能有的小伙伴会问:为什么要在Docker里运行MySQL呢?因为在Docker ...

  6. 利用 FluentScheduler 启动定时器计划任务

    FluentScheduler 是什么? Automated job scheduler with fluent interface. 这是作者在 Github 上的介绍,就是一个定时任务管理器.在 ...

  7. windows开启PostgreSQL数据库远程访问

    1.在PostgreSQL安装目录下data文件夹,打开pg_hba.conf文件,新增允许访问的ip 2.打开postgresql.conf,将listen_addresses = 'localho ...

  8. construct2 入门

    construct2特点 construct2是一款跨平台二维游戏开发引擎,不需要编码,通过定义各个部件和事件完成html5的游戏开发.该引擎可以将开发的封装成多种形式,如phonegap.cocoo ...

  9. python之线程和进程(并发编程)

    python的GIL In CPython, the global interpreter lock, or GIL, is a mutex that prevents multiple native ...

  10. m0n0防火墙安装配置方法

    m0n0防火墙安装配置方法 准备工具: vmware虚拟机 m0n0防火墙安装镜像:M0n0Wall - generic-pc-1.8.1.iso 桥接网卡ip:192.168.43.0/24 hos ...