server {
listen 80;
server_name all.bjed.com;
root "F:\www\asdata";
location / {
index index.html index.htm index.php;
#autoindex on;
    if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
  }

 location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.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;
include fastcgi_params;
}
} thinkphp3
    server {
###SiteName www.bc1.com
listen *:;
server_name www.bc1.com;
root "F:/Visual-NMP-x64/www/BC1";
#error_log "F:/Visual-NMP-x64/logs/Nginx/wwwbc1com-error.log";
#access_log "F:/Visual-NMP-x64/logs/Nginx/wwwbc1com-access.log";
autoindex on;
index index.php index.html index.htm; location /
{
index index.php;
#ThinkPHP REWRITE支持
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?s=$ last;
}
# 跳转设置
if ($host = 'vc.cn') {
rewrite ^/(.*) http://www.vc.cn/$1 permanent;
} }
location ~ [^/]\.php(/|$)
{
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return ;
}
fastcgi_pass 127.0.0.1:;
fastcgi_index index.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;
include fastcgi_params;
}
}

 

thinkphp5 下 的Nginx 伪静态的更多相关文章

  1. Nginx 伪静态教程

    1.将多个域名指向同一web目录: server_name www.php100.com php100.com; rewrite ^/$ / redirect; 2.将不带www的域名301转向到带w ...

  2. Nginx伪静态配置和常用Rewrite伪静态规则集锦

    伪静态是一种可以把文件后缀改成任何可能的一种方法,如果我想把php文件伪静态成html文件,这种相当简单的,下面我来介绍nginx 伪静态配置方法 nginx里使用伪静态是直接在nginx.conf ...

  3. [转]Nginx伪静态配置和常用Rewrite伪静态规则集锦

    Nginx伪静态配置和常用Rewrite伪静态规则集锦 作者: 字体:[增加 减小] 类型:转载 时间:2014-06-10 我要评论 伪静态是一种可以把文件后缀改成任何可能的一种方法,如果我想把ph ...

  4. phpstudy配置php7.1.11 + phpstudy nginx伪静态

    切记要把新的php版本配到环境变量,cmd才会生效 php7.1.11下载地址 http://windows.php.net/download/ 下载之后,解压. 重名的为php-7.1.11-nts ...

  5. 关于destoon6.0下的ngnix伪静态

    关于destoon6.0下的ngnix伪静态配置 ##rewrite nginx rewrite '(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)' ...

  6. windows 下使用Nginx替代apache作为服务器

    说实话, 在windows下使用Nginx 着实有点不太方便, 但因项目需求, 又不想换系统(虽然可以搞个虚拟机玩), 只能用Nginx了 好了, 不多说了. 开始... 首先我用的是xampp包(A ...

  7. Windows下安装Nginx+php+mysql环境

    系统:Windows 7 64位系统 安装之前,首先下载软件: Nginx: http://nginx.org/en/download.html PHP Stable PHP 5.6.26: http ...

  8. windows下安装nginx

    说起开发,自己感到非常惭愧,由于公司让我给<绿电侠>项目写整体架构解决方案,才开始接触nginx这个东东,突然觉得它是一把非常好的利器. 本文主要记录在windows下安装nginx,另参 ...

  9. CentOS下配置nginx conf/koi-win为同一文件的各类错误

    今天配置CentOS6.5下安装Nginx + php7 + mysql5.7.15遇到了一些坑.本来家里的电脑在配置环境的时候没有问题,拿去公司的电脑上就是到处报错.不知道是不是人品问题.今晚在家重 ...

随机推荐

  1. ***使用jQuery去封装插件(组件化、模块化的思想),即扩展方法

    如何使用jQuery去封装插件,区分扩展全局方法与扩展一个普通的jQuery实例对象的方法 1.给全局对象扩展方法:①$.方法 = function(参数可加可不加){}  ②使用:$.方法(有参数的 ...

  2. linux定时任务php

    1. 在需要定时执行的PHP文件的第一行加 #! /usr/local/php/bin/php          服务器php.exe的位置 2. 上传要定时执行的php文件到一个位置,可以通过/pa ...

  3. 在Web API 2 中实现带JSON的Patch请求

    译文:http://www.cnblogs.com/kexxxfeng/p/the-patch-verb-in-web-api-2-with-json.html 原文:https://carly.io ...

  4. 十三 web爬虫讲解2—Scrapy框架爬虫—Scrapy爬取百度新闻,爬取Ajax动态生成的信息

    crapy爬取百度新闻,爬取Ajax动态生成的信息,抓取百度新闻首页的新闻rul地址 有多网站,当你浏览器访问时看到的信息,在html源文件里却找不到,由得信息还是滚动条滚动到对应的位置后才显示信息, ...

  5. java 不可不知的数据库知识-----事物

    每一个java开发对数据库都不会陌生,提到数据库,那么就一定要了解的一个知识点------事物,下面就对事物简单记录一下相关知识点. 最初接触事物的时候其实是从JDBC事物开始的,JDBC比较基础,这 ...

  6. day32 Python与金融量化分析(二)

    第一部分:金融与量化投资 股票: 股票是股份公司发给出资人的一种凭证,股票的持有者就是股份公司的股东. 股票的面值与市值 面值表示票面金额 市值表示市场价值 上市/IPO: 企业通过证券交易所公开向社 ...

  7. asp下去除数组中重复的项的方法

    <%Function MoveR(Rstr) Dim i,SpStr SpStr = Split(Rstr,",") For i = 0 To Ubound(Spstr) I ...

  8. ubuntu15.10运行android studio出错unable to run mksdcard sdk tool

    问题:ubuntu运行android studio出错unable to run mksdcard sdk tool 系统版本:系统是ubuntu 15.10 64位 确认原因:缺少lib 解决方法: ...

  9. SpringInAction--Bean参数的自动注入

    前面我已经学过了,将一个bean引用注入到另一个bean的属性或构造器参数中,这边指的是将一个对象与另一个对象进行关联. 我们学过的方法是在创建的时候根据new对象的时候,注入参数,如下: @Bean ...

  10. Python基础学习----字符串的常用方法

    # Python字符串 # 大多数的语言定义字符串是双引号,Python既可以双引号,也可以单引号.但使用也有区别 # 单双引号的使用 My_name="bai-boy" Demo ...